Hi,
I am trying to send a HTML formatted email through sendmail but all HTML tags appears in the email. I also tried using the MIME even does not work(result dead.letter). Please tell me what is wrong with it.
the result (using MS OUTLOOK 2003):
Content-Type: text/html; charset=us-ascii
<html>
<body>
<center><strong><font size='5' face='arial'>Report</font></strong></center>
</body>
</html>
the script:
open MAIL, "|$sendmail" or die "Cannot pipe $sendmail: $!";
print MAIL "To: $customer\n";
print MAIL "From: $CSRNameRetrieved<$CSREmailAddressRetrieved>\n";
print MAIL "To: $customer\n";
print MAIL "From: $CSRNameRetrieved<$CSREmailAddressRetrieved>\n";
#print MAIL "MIME-Version: 1.0\n";
#print MAIL "Content-Type: text/html; charset=us-ascii\n";
#print MAIL "From: $CSRNameRetrieved<$CSREmailAddressRetrieved>\n";
print MAIL "Subject: You paid ticket #. $ticketID\n";
print MAIL "Content-Type: text/html; charset=us-ascii\n";
print MAIL "\n";
print MAIL "<html>\n";
print MAIL "<body>\n";
print MAIL "<center><strong><font size='5' face='arial'>Report</font></strong></center>\n";
print MAIL "</body>\n";
print MAIL "</html>\n";
print MAIL "\n";
close MAIL;
Bowie Bailey <[EMAIL PROTECTED]> wrote:
#print MAIL "Content-Type: text/html; charset=us-ascii\n";
#print MAIL "From: $CSRNameRetrieved<$CSREmailAddressRetrieved>\n";
print MAIL "Subject: You paid ticket #. $ticketID\n";
print MAIL "Content-Type: text/html; charset=us-ascii\n";
print MAIL "\n";
print MAIL "<html>\n";
print MAIL "<body>\n";
print MAIL "<center><strong><font size='5' face='arial'>Report</font></strong></center>\n";
print MAIL "</body>\n";
print MAIL "</html>\n";
print MAIL "\n";
close MAIL;
Bowie Bailey <[EMAIL PROTECTED]> wrote:
-----Original Message-----
From: Eko Budiharto [mailto:[EMAIL PROTECTED]
Sent: Monday, April 18, 2005 8:23 AM
To: [email protected]
Subject: sending HTML formatted email using SENDMAILHi,I am trying to send a HTML formatted using SENDMAIL, but I always getting an error message, "saved message /.../dead.letter" Can someone explain to me why I am getting this error message?open SENDMAIL, "|$sendmail" or die "Cannot pipe $sendmail: $!";
print SENDMAIL "MIME-Version: 1.0\n";
print SENDMAIL "Content-Type: text/html\n";
print SENDMAIL "To: ", $recipientCustomer, "\n";
print SENDMAIL "From: ", $CSRnumber, "<", $CSRnumber, "> \n";
print SENDMAIL "Subject: Your ticket will be sent. "\n";
print SENDMAIL "\n";
print SENDMAIL "<center><strong><font size='5' face='arial'>Report</font></strong></center>";
close SENDMAIL;What does the $sendmail variable represent? There may be some issues in the way you are calling it.As for the email:1) You should add <html> and <body> tags so that you have proper html in the message. This will make sure it gets displayed properly and also keep anti-spam programs from flagging it.2) Add a newline at the end. Sendmail may do this for you, but it's always a good idea to make sure it's there.So it should look like this:print SENDMAIL "<html><body><center><strong><font size='5' face='arial'>Report</font></strong></center></body></html>";Bowie
Do you Yahoo!?
Make Yahoo! your home page
_______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
