I have the following code:
$subject = "Test Email";
$from = "noreply@bob.com";
ini_set("sendmail_from", $from);
$message = "<html><body bgcolor=\"#DCEEFC\">
Hello<br><br>
This is a <b>test</b> email.
<br><br><hr>
<a href=\"\">Click Here</a>
<br><br><hr>
<br><br>
Thank you for your time,<br><br>
</body></html>";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html\r\n";
$headers .= "From: " . $from . "\r\n";
mail($mail, $subject, $message, $headers);
However, when I send an email to myself, I see all the code in Outlook. If I send it to someone else, they see HTML. If I send it to my hotmail, they see the HTML.
Is this a problem for my Outlook (2007), if so, what is it, or can I do something in the letter to ensure that it displays correctly?
Please, help!
source
share