pulleys
10-09-2007, 04:50 PM
hi,
I have a php script that generates an html e-mail but when it e-mails the e-mail shows up just as unprocessed html. It seems like the e-mail program is not rendering the html at all. It does this with both gmail and Mac Mail. I've been online looking for a solution online but end up going in circles. I have a feeling it's something to do with the headers.
Heres the relevant code:
$headers .= "MIME-version: 1.0\r\n";
$headers .= "Content-type: text/html\r\n";
$headers .= "From: $fromName ($fromEmail)";
mail($toEmail, $subject, $message_html ,$headers);
Any ideas.
Thanks
I have a php script that generates an html e-mail but when it e-mails the e-mail shows up just as unprocessed html. It seems like the e-mail program is not rendering the html at all. It does this with both gmail and Mac Mail. I've been online looking for a solution online but end up going in circles. I have a feeling it's something to do with the headers.
Heres the relevant code:
$headers .= "MIME-version: 1.0\r\n";
$headers .= "Content-type: text/html\r\n";
$headers .= "From: $fromName ($fromEmail)";
mail($toEmail, $subject, $message_html ,$headers);
Any ideas.
Thanks