i have an email-a-friend function on my site. i have taken great pains thru pattern matching to prevent hackers from spammin through this function and now i would like to make sure that my email gets through to intended recipients and i want to make sure i do what i can to make my messages seem as un-spam-like as possible.
the messages are plain text. i have noticed that they fail the Sender ID check that hotmail performs. I also want to make sure that messages are sent with normal priority rather than high priority as they are now. Any suggestions would be much appreciated.
$from_email = ($user_logged_in) ? $user_email : 'no-reply@mydomain.com';
$headers="MIME-Version: 1.0 \n";
$headers.="From: " . $from_name . " <" . $from_email . ">\n";
$headers.="X-Sender: <" . $from_email . ">\n";
$headers.="X-Mailer: PHP\n";
$headers.="X-Priority: 1\n";
$headers.="Return-Path:<" . $from_email . ">\n";
// this is not html email
// $headers.="Content-Type: text/html; charset=iso-8859-1\n";
mail($_POST['to_email'], $email_subject, $email_message, $headers)
or myplan_error("Mail failed to send");