Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sendmail Sending.....but not what i want

Status
Not open for further replies.

bretttt

Programmer
Jul 23, 2002
74
0
0
US
Hello, i have a simple question on sending html email with sendmail. I have this code that works fine but just prints the html please help! thansk in advance, Brett.

open (SENDMAIL, "| $sendmailpath -t") || die "Cant access sendmail at $sendmailpath. Reason: $!";
;
print SENDMAIL "Subject: $subject\n";
print SENDMAIL "From: $from\n";
print SENDMAIL "To: $to\n\n";
print SENDMAIL "Content-type=text/html\n\n";
print SENDMAIL "
<font color=red>dsfdsfdf
";

close (SENDMAIL);
 
Not the answer you were looking for but I use the Mail::Sendmail module for HTML messages. It's easy to use and portable ...

-Chris Larivee
 
larivee's on the right track. Piping directly to sendmail can be easily exploited so using one of the many mailing modules (MIME::Lite, Mail::Sendmail, Mail::Mailer etc.).

In any case - I don't understand your problem. You say that it sends the mail but 'just sends the html'. Isn't that what it's supposed to do?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top