I would like to send an email in HTML-format using the mail() function. Somehow, mail() just works with plain text which causes the recipient receiving plain HTML codes. I added "Content-Type: text/html" as additional header, but it still didn't work.
Any ideas?
Thanks, Chris.
use this as part of your headers, then it will work.
Content-type: text/html; charset=iso-8859-1
Cheers!
Thanks for the answer, but it still doesn't work. Below is my line, did I do something wrong?
mail("myaddress@domain.com",$subject,$message,"From: ".$sender,"Content-type: text/html; charset=iso-8859-1");
Thanks again, Chris.
try this and see if it helps...
$headers = "From: \"your name\" <this@that.com>\n"; $headers .= "Content-Type: text/html; charset=iso-8859-1\n";
mail($to, $subject, stripslashes($message), $headers);
It works! Thanks a lot for your help.
Best regards from Germany, Chris.