Sending HTML Email Help
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?
Any help would be great.
/*Send Email To New Affiliate*/
$to = $email;
$message = "HTML CODE GOES HERE";
$from = "firstname.lastname@example.org";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$headers .= 'From: <email@example.com>' . "\r\n";
Where is $subject coming from?
What do you mean "breaking my code", what errors are you seeing?
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 '\n' instead of '\r\n'.