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!

HTML mail outs?

Status
Not open for further replies.

coicle

Programmer
Joined
Sep 25, 2003
Messages
8
Location
GB
Hi,
I'm trying to produce an HTML mail out that will be sent out using my 'mail()' function. But everytime I write a message and send it, the recieved email is rendered with my tags as text. How can I send a mail with the message to be rendered in HTML? Do i need to include any headers or anythign special? (I am using an HTML email server so it can render HTML mails) Thanks,

dan
 
No worries I ahve solved it on my ownself, u have to use...

/* To send HTML mail, you can set the Content-type header. */
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: webmaster@{_SERVER['SERVER_NAME']}\r\n";
/*That has set up all the headers*/


/* and now mail it */
mail($ToEmail, $ToSubject, $Message, $headers);

email me if u want any of it explaining, 'cos I'll try my best y'all,
dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top