Hi all,
I've been running the following simple mail script on my sites for a while now, but it's now started working differently.
$comments = str_replace("\n","<br>",addslashes($_POST[comments]));
$headers = 'MIME-Version: 1.0' . '\r\n';
$headers .= 'From: ' . $_POST[name] . ' <' . $_POST[email] . '>' . '\r\n';
$headers .= 'Content-type: text/html; charset=iso-8859-1' . '\r\n';
if (mail("my@email.com", "Enquiry From Help Form", stripslashes($comments), $headers))
{
echo "Thank you for your email. We'll get back to you as soon as possible.";
}
The email sends, but the 'From' section is empty, the HTML isn't parsed and the headers appear in the message body.
Does anyone know how to fix this?
Thanks,
Mike