I have written a small script using the mail function. It works but not to all email addresses entered from a form. I suspect that SPAM silters along the way are blocking it.
Does anybody have an idea on how to improve the headers to that the mail will be delivered 100% of the time? Here is my code.
$recipient = $_POST[email].", admin@mydomain.com";
$subject = "Subject Text";
$mailheaders = "MIME-Version: 1.0\r\n";
$mailheaders .= "Content-type: text/plain; charset=iso-8859-1\r\n";
$mailheaders .= "X-Priority: 1\r\n";
$mailheaders .= "X-MSMail-Priority: High\r\n";
$mailheaders .= "X-Mailer: php\r\n";
$mailheaders .= "From: admin@mydomain.com\r\n";
$mailheaders .= "Reply-to: admin@mydomain.com\r\n";
$mailheaders .= "Return-path: admin@mydomain.com";
$msg = "Thank you blah, blah, blah.\n";
mail($recipient, $subject, $msg, $mailheaders);