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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to send HTML email with sendmail

Status
Not open for further replies.

Perllees

Technical User
Apr 17, 2001
7
SG
I know how to send normal header mail with sendmail. I've tied to get info about sending HTML via sendmail but not much help. I hope you can help me here. Not urgent just want to know. :)


 

Well, this is a great place to get such info,

Simply

print "Content-type: text\html\n\n";

before you print any outgoing html, just sendind the header will let the mail reader know it's html.

Tony
 
Thank Tony,
Your description is too brief. Can you explain in more detail? If you saying about include it this way

open(MAIL,"|/usr/sbin/sendmail -t");
print MAIL "To: someone\@email.com";
print MAIL "From: me\@email.com";
print MAIL "Subject: "my subject";
print MAIL "Content-type:text/html\n\n";

html content here ....

close(MAIL);

I've done this but it don't work. Please help.
:)
 
Of course, if the recipient doesn't have HTML enabled for email it won't help. Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top