Forum Moderators: coopster

Message Too Old, No Replies

PHP & HTML E-mail

Help Please

         

stidj

5:03 am on Aug 16, 2005 (gmt 0)

10+ Year Member



Ok guys, I gave you the round of beer even though I solved my own problem :).

I can't find any examples/tutorials on how you would send an e-mail with HTML. I know it doesn't work quite right if you just embed the HTML so what do I need to put in the headers?

Thanks

dreamcatcher

7:31 am on Aug 16, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi stidj,

You need to declare the content type as 'text/html'.

$headers = "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: Yoursite<you@youremail.com>\n";

mail($email,$subject,$message,$headers);

Good luck.

dc

stidj

1:38 pm on Aug 16, 2005 (gmt 0)

10+ Year Member



Thanks,

Now to make life more difficult for you......how would you send the message as both text and HTML?

Thanks guys :)