I'm trying to create a php script that will handle a mailing list for me using a mySQL database, and I have most of it in place. Unfortunately, I can't seem to get the headers to work right, and I'm not sure what the problem is.
$headers='From: firstname.lastname@example.org rn'; $headers.='Reply-To: email@example.com'; $headers.='X-Mailer: PHP/' . phpversion().'rn'; $headers.= 'MIME-Version: 1.0' . "rn"; $headers.= 'Content-type: text/html; charset=iso-8859-1 rn'; $headers.= "BCC: $emailList";
The result I'm getting on the recieving end is:
"noreply"@rilburskryler.net rnReply-To: firstname.lastname@example.orgX-Mailer: PHP/5.2.13rnMIME-Version: 1.0
To have names, as opposed to email addresses shown, use the following:
Regarding the broken line breaks, that is because you are enclosing the text in apostrophes rather than quotation marks: