Hi all!
 
Here is the problem.
I use Net::SMTP module for sending mails from shopping cart script
(WinNT4.0 +WebSite):
 
#! d:/perl/bin/perl.exe
use CGI::Carp qw (fatalsToBrowser);
use Net::SMTP;
....
main code here
....
sub smtpmail
{
my ( $to,$from, $subject, $message) = @_;
 

        $smtp = Net::SMTP->new("$smtp_addr"); # connect to an SMTP server
        $smtp->mail("$from" );     #  sender's address
        $smtp->to("$to");           # recipient's address
        $smtp->data();                      # Start the mail
 
        # Send the header.
        $smtp->datasend("To: $to\n");
        $smtp->datasend("From: $from\n");
        $smtp->datasend("Subject: $subject\n");
        $smtp->datasend("Content-type: text/html\n");
$smtp->datasend("\n");
 
        # Send the body.
        $smtp->datasend("$message\n");
        $smtp->dataend();                   # Finish sending the mail
        $smtp->quit;                        # Close the SMTP connection
 return 1;
}
 
HTML code in mail's body is corrupt.
There is  &nb  sp; instead of      O  rder  instead of  Order,
<tclass="2"d>  instead of  <td class="2">  and so one.
When I send mails in plain text format, everything is OK.
Please help!
N/


 
 
 
 

Reply via email to