If I send HTML emails from my server to the email accounts on my server I only get the HTML code, but if someone else sends me HTML email I'm able to open it.
And if I send the HTML emails from my server to other servers like Yahoo! or Hotmail, I can get the HTML email. Does anyone know what's going on? Is the code below correct?
$from_name = "John";
$from_email = "test@yahoo.com";
$email_to = "myself@myserver.com";
$header = "From: $from_name <$from_email>\r\n";
$header .= "MIME-Version: 1.0\r\n";
$header .= "Reply-To: <$from_email>\n";
$header .= "Content-type: text/html; charset=iso-8859-1\r\n";
$header .= "Return-Path: $from_email\r\n";
$subject = "Just Testing";
$message = "<hmtl><head></head><body><center><h2>Test</h2></center></body></html>";
mail($email_to, $subject, $message, $header);
Even the php.net's html email example doesn't work from my server to my server