FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


HTML with mail()





RoughitforGreen247
Is it possible to send html content with the mail() function? Does it have to do with what type of form input you use, or is it even possible?
thnn
you need to add in a header on the mail tag

Code:
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

mail("address","subject","message","$headers");


That will mean that the client will read it as html and therefore convert the tags and display it as html instead of showing the source.
RoughitforGreen247
That worked great, thanks!
Related topics
This topic is locked: you cannot edit posts or make replies.    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.