Page 1 of 1

Confusing Problem With Email Delivery From My Site to AOL

Posted: Sat May 24, 2008 5:42 pm
by entropy99
The confirmation emails sent from my website http://earthlandrealms.com when users sign up isn't being delivered to aol.com address's and some other email providers. The strange thing is if I send the same exact email manually using the web based email program Horde, on the same server, using the same email address, it gets delivered. Both Horde and the page sending the email are PHP. The only thing I can think of is that maybe the code is wrong somehow even though the emails do get delivered to gmail and others. Here's the code:

Code: Select all

$ism=mail($cgi['email'],"EarthlandRealms.com Activation e-mail","Welcome to Earthland Realms! \n Your username is: {$cgi['username']} \n Your activation password is {$pas} \n\nEarthlandRealms.com", "From: noreply@dontspamme.com");

Re: Confusing Problem With Email Delivery From My Site to AOL

Posted: Sat May 24, 2008 11:19 pm
by LSJason
Certain e-mail providers have different rules regarding how their incoming e-mails are treated. What I would suggest, if you have the time and money, is to set up a FBL with AOL, allowing you to ensure a good percentage of delivery so long as you comply with CAN-SPAM.

Re: Confusing Problem With Email Delivery From My Site to AOL

Posted: Sun May 25, 2008 2:27 am
by entropy99
The thing is AOL delivers my email when I send it from Horde, but not when my script sends it. As far as I can tell everything else is equal.

Re: Confusing Problem With Email Delivery From My Site to AOL

Posted: Sun May 25, 2008 10:46 am
by LSJason
With AOL, you need to set certain headers in the outgoing e-mail that you don't necessarily need for other mail carriers. Here's what seems to work for me:

Code: Select all

 
        $headers = "";
    $headers .= "From: $EMAIL_FROM<$EMAIL_FROM>\n";
    $headers .= "Reply-To: <$EMAIL_FROM>\n";
    $headers .= "X-Sender: <$EMAIL_FROM>\n";
    $headers .= "X-Mailer: PHP4\n"; //mailer
    $headers .= "X-Priority: 3\n"; //1 UrgentMessage, 3 Normal
    $headers .= "Return-Path: <$EMAIL_FROM>\n";
    $headers .= "Content-Type: text/html; charset=iso-8859-1\n";
    mail($EMAIL_TO,$EMAIL_SUBJECT,$EMAIL_TEXT,$headers);