Guys,
A client of mine requires the ability to send out HTML formatted emails after a database post. When I send the email out to yahoo or hotmail, the actual HTML tags are visibile. Using these same yahoo and hotmail accounts, i can view emails from other providers that are formatted with HTML, so this tells me my code is wrong.
$body= <<< ENDOFBODY
<html>
<head>
<meta http-equiv="Content-Type" content="text/htmln">
</head>
<body>
<br>
Thank you for placing order $order_no . <br><br>
We will see you on: $displaydate.<br><br>
If you have any questions please contact us at: <a href="mailto:test@test.com">Test Customer Service</a><br><br>
Thanks,<br>
<img src="logo.gif">
</body>
</html>
ENDOFBODY;
$test=mail($to,$subject,$body,'From: [email]test@test.com[/email]);
When I send the email to other browsers I am able to view the HTML formatting properly. Is there something wrong with my code? What is the best practice for email, HTML or plain text?
Thanks for your help.