send email to gmail NOT as attachement

[email protected] (kitty)
Newsgroups perl.beginners.cgi
Organization http://groups.google.com
Message-ID <[email protected]>
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 portion 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) =
@_;

	# 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);
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.