You are here: HTML email using PHP problem (Receive html tags) « PHP Programming Language « IT news, forums, messages
HTML email using PHP problem (Receive html tags)

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация