Jump to content


Photo

html in an email


  • Please log in to reply
2 replies to this topic

#1 mbvo

mbvo
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 04 September 2006 - 11:55 PM

How do i send an email containing html in the body?

#2 switchdoc

switchdoc
  • Members
  • PipPip
  • Member
  • 22 posts
  • LocationColorado

Posted 05 September 2006 - 12:02 AM

I don't know exactly how your script is set up, but to send in HTML you'll want to output this to the headers:

"Content-Type: text/html; charset=\"iso-8859-1\"\n"
"Content-Transfer-Encoding: 8bit\r\n\r\n";

Hope that helps a little.

-Switchdoc

#3 mitzleah

mitzleah
  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts
  • LocationManila, Philippines

Posted 05 September 2006 - 05:21 AM

Specifically this should be like this:

$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

mail($to,$subject,$body,$headers) or die("Error Sending Email");

Hope this one will clarify! :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users