I'm using below code for php html email:
$to = $email;
$subject = 'ABC';
$message = $content;
$headers = "MIME-Version: 1.0
";
$headers .= "Content-type: text/html; charset=iso-8859-1
";
$headers .= 'From: ABC <a@b.com>'."
";
mail($to, $subject, $message, $headers); // Send our email
where
$content='<html>
<head>
<title>Thanks</title>
</head>
<body>
<div>
<b>Thanks for your email</b>
</div>
</body>
</html>'
Now the email received contains:
Thanks for your email
I have read several examples, I'm not doing anything wrong as far as format of header goes. Can't identify problem, help? Also, any help suggestions with implementation of e-newsletter would be helpful.
First of all no need to use <Head>
tags in a mail formatted in HTML.
Try this:
$content = '<html><body>';
$content .='<div><b>Thanks for your email</b></div>';
$content .='</body></html>';
Or this:
$content = "
<html>
<body>
<div>
<b>Thanks for your email</b>
</div>
</body>
</html>";
One of them will do the trick.
may be are interpreted as Encoded HTML Text .. so use html tags
<br>
and see for