Click to See Complete Forum and Search --> : HTML Mail Not working?


h3r0
01-13-2008, 01:15 PM
I have the headers set as:

$headers .= "From: newuser@mysite.com\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
mail($email,"New User Registered",$message,$headers);

However, its not coming out as HTML formatted in the emails. I see all of the html tags.

-h3r0

blue-eye-labs
01-13-2008, 02:17 PM
I think it has something to do with the "from" header... I had the same problem, removed that header and then it worked...

smickus
01-14-2008, 08:49 AM
Maybe the content-type has to be set before the From? Or what blue-eye-labs said...

blue-eye-labs
01-14-2008, 11:43 AM
it seems that if your host uses a CGI-mailer (which mine does) then it automatically sets the from header &c... this seems to override all your own headers if you specify that one.
I had the content type set first initially... it still didn't work.
Also you should specify the MIME-type, I think.