I have problems sending PHP generated HTML emails to Hotmail addresses and other similiar webmail accounts. The subject line is fine but the email bodies are blank. It seems the information is received, it is just not visible, since if the emails are sent on as an attachment they are viewable in other email clients.
Normal email clients receive the emails fine (Outlook, Outlook express etc.)
I have experimented with all different headers i could lay my hands on and varied the new lines \r\n and \n and \n\n and so on but nothing seems to work. Also tried base64 coding.
Does anybody have experience on this matter?
The following code is my best shot so far but Hotmail wont display...:
$headers = "From: $myname <$gotos>\n";
$headers .= "Reply-To: <$email>\n";
$headers .= "Errors-To: <$gotos>\n";
$headers .= "Return-path: <$gotos>\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$headers .= "Content-Transfer-Encoding: 7bit\n";
$headers .= "X-Priority: 1\n";
$headers .= "X-MSMail-Priority: High\n";
$headers .= "X-Mailer: iCEx Networks HTML-Mailer v1.0";
$subject ="Hello";
$body = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n";
$body .= "<html>\n";
$body .= "<head>\n";
$body .= "<Title>hello</title>\n";
$body .= "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">";
$body .= "</head>\n";
$body .= "<body>My message\n";
$body .= "</body>\n";
$body .= "</html>\n";
mail($emailu, $subject, $body, $headers);