Please help me, I am having problems with sending an html formatted mail message using php mail()
I think the problem lies in the header. I have included two headers with a slight difference only in single quotes or double quotes:
header 1:
$headers = 'From: [email protected]\r\n Reply-To: [email protected]';
$headers .= '\r\nContent-Type: multipart/alternative; boundary="'.$random_hash.'"';
When I use single quotes like above, all my html code is printed in the mail as simple text without th proper html formatting. Also my header is shown all messed up with everything after \r\n missing.
header 2:
$headers = "From: [email protected]\r\nReply-To: [email protected]";
$headers .= "\r\nContent-Type: multipart/alternative; boundary=\"".$random_hash."\"";
Using this one, I get a perfect header but now my mail is sent empty with an empty attachment. I don't where that comes from as I don't attach anything to my mail.
Please suggest what to do