stelthius Posted May 25, 2009 Share Posted May 25, 2009 Ok guys for hours now ive been trying to get headers to work with my code so that i can use HTML in my PHP Mails that are sent out i have tried everything i have seen, ive read everything in the manual but seem to be making no progress, here is my enitial code can anyone give me any ideas or tips on doing this as im completely baffled now.. { function sendWelcome($user, $email, $pass){ $from = "From: ".EMAIL_FROM_NAME." <".EMAIL_FROM_ADDR.">"; $subject = "PHP-Core.com - Welcome!"; $body = "TESTER"; return mail($email, $subject, $body, $from); } Just for those that are wondering why i have this function sendWelcome($user, $email, $pass){ thats so i can use $user $email $pass in the email to tell the user what they registered with etc you know the drill, anyways Any help is greatly appretiated guys. *EDIT* My email form works fine, ive already tested it my problem is getting HTML to work in it, upto now ive not managed it Link to comment https://forums.phpfreaks.com/topic/159578-solved-using-html-in-php-mail-function/ Share on other sites More sharing options...
phpdragon Posted May 25, 2009 Share Posted May 25, 2009 perhaps try adding this $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= $from; mail($email, $subject, $body, $headers); Link to comment https://forums.phpfreaks.com/topic/159578-solved-using-html-in-php-mail-function/#findComment-841736 Share on other sites More sharing options...
stelthius Posted May 25, 2009 Author Share Posted May 25, 2009 Heh... Thanks mate, the only thing i hadnt tried :s thanks again Link to comment https://forums.phpfreaks.com/topic/159578-solved-using-html-in-php-mail-function/#findComment-841739 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.