adwarm — 2011-12-14T09:49:25-05:00 — #1
I know how to send HTML emails using PHP but the problem I'm having is the HTML code is breaking my code and just wondering what the best way of doing this is?
/*Send Email To New Affiliate*/
$to = $email;
$message = "HTML CODE GOES HERE";
$from = "email@example.com";
$headers = "MIME-Version: 1.0" . "\\r\
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\\r\
$headers .= 'From: <firstname.lastname@example.org>' . "\\r\
Any help would be great.
cups — 2011-12-14T10:06:12-05:00 — #2
Where is $subject coming from?
What do you mean "breaking my code", what errors are you seeing?
raju_gautam — 2011-12-14T10:53:40-05:00 — #3
I guess 'breaking' means you have got the non-formatted HTML codes in your email and I suspect that because of new line character treated by different servers so try with only '\
' instead of '\r\