From: Eko Budiharto [mailto:[EMAIL PROTECTED]
>
> 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 "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;
 
This script worked just fine for me:
 
  $mesg  = "To: \"Test user 2\" <[EMAIL PROTECTED]>\n";
  $mesg .= "From: \"Test user 1\" <[EMAIL PROTECTED]>\n";
  $mesg .= "Subject: Report\n";
  $mesg .= "Content-Type: text/html; charset=iso-8859-1\n";
  $mesg .= "Content-Transfer-Encoding: 7bit\n";
  $mesg .= "\n";
  $mesg .= "<HTML>\n";
  $mesg .= "<BODY>\n";
  $mesg .= "<center><strong><font size='5' face='arial'>Report</font></strong></center>\n";
  $mesg .= "</BODY></HTML>\n";
  $mesg .= "\n";
 
  open MAIL, '|sendmail -f "[EMAIL PROTECTED]" [EMAIL PROTECTED]';
  print MAIL $mesg;
  close MAIL;
 
Bowie
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to