Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners Cgi > send email to g...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 1418 of 1478
Post > Topic >>

send email to gmail NOT as attachement

by yanlu06@[EMAIL PROTECTED] (Kitty) Sep 26, 2007 at 09:08 PM

I was trying to send a text file  as email content to user's email
account.  But only gmail accounts's users got the email with empty
content with a "noname" attachment. users with other email accounts
such as yahoo don't have such problem. they can view the email with
the content.

does anyone know what the problem is? Thanks!!!

### following is the ****tion of code to process the text file into
email content ####
# Open and build application information file
	$apptext = '';
        open (MAILAPP, $APPINFO);
        while (<MAILAPP>) {
                $apptext .= $_;
        }
        close (MAILAPP);

	# Mail it, see mailinc.pl
	&MAILOUT($in{'return_address'}, $MAILADDRESS, "$GROUPNAME application
information", '', $apptext);

	# Print appropriate html message
	print "Application information sent to $in{'return_address'}.<p>\n";

#### following code is suppose to send out the email content to users
####

sub MAILOUT {
	local($mail_address, $from_address, $subject, $header_tags, $body) =
@[EMAIL PROTECTED]
 Open file for pipe to mail
	open (MAILHANDLE,"| mail $mail_address\n");

	# Format email header information
	print MAILHANDLE "From: $from_address\n";
	print MAILHANDLE "To: $mail_address\n";
	print MAILHANDLE "Subject: $subject\n";
	print MAILHANDLE "$header_tags\n";
	print MAILHANDLE "Content-type: text/plain\n\n";

	# Print body
	print MAILHANDLE $body;

	# Close pipe to mail
	close (MAILHANDLE);
}
 




 1 Posts in Topic:
send email to gmail NOT as attachement
yanlu06@[EMAIL PROTECTED]  2007-09-26 21:08:31 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 18:57:19 CDT 2008.