My customers who use AOL email cannot receive my email generated from php script I use. I try to look into AOL email guide but do not have a clue how to solve the problem. Please can anyone help? Here's my code:

require_once "Mail.php";
$host = "abc.com";
$from = $_POST['client']." <".$_POST['email'].">";
$subject = $_POST["subject"];
$message = stripslashes($_POST["textarea"]);
$headers = array ('From' => $from, 'To' => $biz_email, 'Subject' => $subject, 'MIME-Version' => '1.0', 'Content-type' => 'text/plain; charset=UTF-8');
$smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => false, 'username' => '', 'password' => ''));
$mail = $smtp->send($biz_email, $headers, $message);

Recommended Answers

All 4 Replies

No response after a week... :(

Is that mean no one encountered the same problem?

Is it failing to reach your users specifically on AOL or is it failing on other mail hosts also?

require_once "Mail.php";

What mail class are you using? Does it check for mail injection? If it doesn't, your php allows for mail injection. This would be the cause of your mail being blocked because its being used by others to send spam..
You should always escape any new lines from mail headers such as:

$from = $_POST['client']." <".$_POST['email'].">";

The PHP docs on the mail() function also have a few pointers on how not to get your emails in spam folders. see: http://www.php.net/mail

Hi,

AOL is a bit of a pain with their email servers. They make you jump through hopes to be able to send them mail.

The major stumbling blocks for most people is that need to ensure that you have a PTR record setup for your server that points to the domain that you are sending the email from.

Then you need to make sure that you have properly formed email headers you email doesn't look like a spam.

If you are going to be sending more that 100 emails to AOL users a month then you need to register your domain on the AOL whitelist.

If you are still having problems you can post a bounced message or at least the error that it is giving you and I might be able to give you more of a hint as to what step to take next.

Hi...

I'm using mdaemon 10.0.0... version. for smtp relay.

I have problem while relaying mails to aol.com through mifi-microsense.com relay server and it is behind the pix firewall. Error says reverse lookup issue.

How do i confirm this problem, this is due to my PTR Record setup issue or some other issue.

Message

Wed 2008-12-24 10:16:58: [14:1] Attempting SMTP connection to [64.12.138.57:25]
Wed 2008-12-24 10:16:58: [14:1] Waiting for socket connection...
Wed 2008-12-24 10:16:59: [14:1] * Connection established (192.168.44.6:1127 -> 64.12.138.57:25)
Wed 2008-12-24 10:16:59: [14:1] Waiting for protocol to start...
Wed 2008-12-24 10:16:59: [14:1] <-- 220-rly-md01.mx.aol.com ESMTP mail_relay_in-md01.7; Tue, 23 Dec 2008 23:47:00 -0500
Wed 2008-12-24 10:16:59: [14:1] <-- 220-America Online (AOL) and its affiliated companies do not
Wed 2008-12-24 10:16:59: [14:1] <-- 220- authorize the use of its proprietary computers and computer
Wed 2008-12-24 10:16:59: [14:1] <-- 220- networks to accept, transmit, or distribute unsolicited bulk
Wed 2008-12-24 10:16:59: [14:1] <-- 220- e-mail sent from the internet. Effective immediately: AOL
Wed 2008-12-24 10:16:59: [14:1] <-- 220- may no longer accept connections from IP addresses which
Wed 2008-12-24 10:16:59: [14:1] <220> EHLO mifi-microsense.com
Wed 2008-12-24 10:17:00: [14:1] <-- 250-rly-md01.mx.aol.com peer name unknown
Wed 2008-12-24 10:17:00: [14:1] <250> MAIL From:<tlpoeil>
Wed 2008-12-24 10:17:00: [14:1] <250> RCPT To:<tlpoeil>
Wed 2008-12-24 10:17:00: [14:1] <250> DATA
Wed 2008-12-24 10:17:00: [14:1] <-- 354 START MAIL INPUT, END WITH "." ON A LINE BY ITSELF
Wed 2008-12-24 10:17:00: [14:1] Sending <c> to [64.12.138.57]
Wed 2008-12-24 10:17:00: [14:1] Transfer Complete
Wed 2008-12-24 10:17:01: [14:1] <-- 421-: (DNS:NR) http://postmaster.info.aol.com/errors/421dnsnr.html
Wed 2008-12-24 10:17:01: [14:1] <421> QUIT
Wed 2008-12-24 10:17:01: [14:1] <-- 221 SERVICE CLOSING CHANNEL
Wed 2008-12-24 10:17:01: [14:1] This message is 18 minutes old; it has 42 minutes left in this queue
Wed 2008-12-24 10:17:01: [14:1] SMTP session terminated (Bytes in/out: 9155/26039)
Wed 2008-12-24 10:17:01: ----------

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.