I am using simple mail() function to send mails, and everything works fine tile I supply a header info, as shown below:
$headers = "MIME-Version: 1.0\r\n";
$headers.= "Content-type: text/html; carset=iso-8859-1;\r\n";
$headers.= "From: TESTSITE <".$mailfrom.">\r\n";
Also, on another note, my cpanel server doesn’t show the msg log, so I can’t exactly figure out why the mail failed. But for one thing, I am quite sure the problem is due to the inclusion of the header, any ideas what could be wrong and how to debug?
You have a mistake:
carset=iso-8859-1shuld becharset=iso-8859-1.Also due to PHP – mail() manual : ”
If messages are not received, try using a LF (\n) only instead of CRLF (\r\n). Some poor quality Unix mail transfer agents replace LF by CRLF automatically (which leads to doubling CR if CRLF is used). This should be a last resort, as it does not comply with » RFC 2822.”