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);
}


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to