|
Posted by patrice.fiset@gmail.com on 05/18/07 21:10
Hi all,
When I send the html email, the only thing I receive is the tags (the
html codes basically). I want to be able to see the email like a html
page, what is wrong with my code? Here is a copy paste of it.
$HTML = "</html><body><img src='http://www.somewebsite.com/
someimage.jpg'></body></html>";
$headers = "From: $from\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$boundary = uniqid("HTMLDEMO");
// Now we attach the HTML version
$headers .= "--$boundary\r\n".
"Content-Type: text/html; charset=ISO-8859-1\r\n".
"Content-Transfer-Encoding: base64\r\n\r\n";
$headers .= chunk_split(base64_encode($HTML));
mail($to,$subject,"",$headers);
print "mail Sent<br>";
The email I receive has this as text:
</html><body><img src='http://www.somewebsite.com/someimage.jpg'></
body></html>
Thanks!
Navigation:
[Reply to this message]
|