I’m using below code for php html email:
$to = $email;
$subject = 'ABC';
$message = $content;
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= 'From: ABC <a@b.com>'."\r\n";
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:
\r\n \r\n \r\n \r\n
\r\n
\r\n Thanks for your email\r\n
\r\n
\r\n
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:
Or this:
One of them will do the trick.