Forum Moderators: coopster
I have a script that sends a mail to customers of the site. It seems that everybody gets it except people with AOL. To send the mail I do:
$headers = "From: Mydomain <orders@mydomain.com>\r\n";
$headers .= "X-Sender: <orders@mydomain.com>\r\n";
$headers .= "X-Mailer: PHP\r\n";
$headers .= "X-Priority: 1\r\n";
$headers .= "Return-Path: <orders@mydoamin.com>\r\n";
...
mail($to, $subject, $out, $headers);
Could it be some anti spam or something like that? If so what can I do? I use these to send order confirmations and passwords, so they're not spam.
Thanks
If you send a lot of mail to AOL users, or if you work with them in any kind of partnership capacity then get onto their technical department, because there is a global white list which you can be added to (there are some quite strict criteria to be met).
If they won't listen to you then buy some paid advertising or PPC with them and say: "why should I advertise on your site when your users can't even get my emails confirming a sale?".
function SEND_HTML_MAIL($mail_info) {
$from_name = $mail_info["from_name"];
$from_address = $mail_info["from_address"];
$to_name = $mail_info["to_name"];
$to_address = $mail_info["to_name"]." <".$mail_info["to_address"].">";
$message = $mail_info["message"];
$subject = $mail_info["subject"];
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: ".$from_name." <".$from_address.">\r\n";
$headers .= "Reply-To: ".$from_name." <".$from_address.">\r\n";
$headers .= "X-Priority: 3\r\n";
$headers .= "X-MSMail-Priority: Normal\r\n";
$headers .= "X-Mailer: iCEx Networks HTML-Mailer v1.0";
mail($to_address, $subject, $message, $headers);
}
to send mail just do this :
$mail_info["from_name"] = "FROM_NAME";
$mail_info["from_address"] = "FROM_ADDRESS";
$mail_info["to_name"] = "TO_NAME";
$mail_info["to_address"] = "TO_ADDRESS";
$mail_info["message"] = "HTML MESSAGE";
$mail_info["subject"] = "SUBJECT";
SEND_HTML_MAIL($mail_info);
if some bulk mails filter is deleting your message you can change the following :
$headers .= "X-Priority: 3\r\n";
$headers .= "X-MSMail-Priority: Normal\r\n";
to :
$headers .= "X-Priority: 1\r\n";
$headers .= "X-MSMail-Priority: High\r\n";
For plain text change :
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
to :
$headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";