Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 2040 | Replies: 3
![]() |
•
•
Join Date: Jan 2005
Location: Sheffield, UK
Posts: 294
Reputation:
Rep Power: 4
Solved Threads: 6
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:
[PHP]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);[/PHP]
[PHP]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);[/PHP]
Ecommerce-Web-Store.com Building Your e-Business.
•
•
Join Date: Jan 2005
Location: Sheffield, UK
Posts: 294
Reputation:
Rep Power: 4
Solved Threads: 6
No response after a week... 
Is that mean no one encountered the same problem?

Is that mean no one encountered the same problem?
Ecommerce-Web-Store.com Building Your e-Business.
Is it failing to reach your users specifically on AOL or is it failing on other mail hosts also?
[php]require_once "Mail.php";[/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:
[php]
$from = $_POST['client']." <".$_POST['email'].">";[/php]
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
[php]require_once "Mail.php";[/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:
[php]
$from = $_POST['client']." <".$_POST['email'].">";[/php]
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
www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
•
•
Join Date: Oct 2006
Location: London
Posts: 42
Reputation:
Rep Power: 3
Solved Threads: 4
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.
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.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)





Linear Mode