I am trying to use Sendmail to send an HTML email. apart from not wotking
the folloing script returns and erro message of Premature end of script
headers
#!/usr/bin/perl
use CGI;#::Carp qw(fatalsToBrow ser);
my $to='example@co m.com';
my $from= 'example@com.co m';
my $subject='Using Sendmail';
open(MAIL, "|/path/sendmail -t");
print MAIL "To: $to\n";
print MAIL "From: $from\n";
print MAIL "Subject: $subject\n\n";
print MAIL "Content-type: text/html\n\n";
print MAIL "Hello Friend\n";
print MAIL "It has been brought to our attention that you are interested in
using the sendmail program.\n";
print MAIL "If you use the template script given here you should be sending
email from your website today.\n";
print MAIL "Thank you.\n";
print MAIL "Create a Site\n";
close(MAIL);
the folloing script returns and erro message of Premature end of script
headers
#!/usr/bin/perl
use CGI;#::Carp qw(fatalsToBrow ser);
my $to='example@co m.com';
my $from= 'example@com.co m';
my $subject='Using Sendmail';
open(MAIL, "|/path/sendmail -t");
print MAIL "To: $to\n";
print MAIL "From: $from\n";
print MAIL "Subject: $subject\n\n";
print MAIL "Content-type: text/html\n\n";
print MAIL "Hello Friend\n";
print MAIL "It has been brought to our attention that you are interested in
using the sendmail program.\n";
print MAIL "If you use the template script given here you should be sending
email from your website today.\n";
print MAIL "Thank you.\n";
print MAIL "Create a Site\n";
close(MAIL);
Comment