Go Back   HostGator Peer Support Forums > HostGator Peer Support Forums > Linux VPS Support

Notices

Reply
 
Thread Tools
  #1  
Old 09-07-2010, 03:28 PM
sorathia sorathia is offline
Hatchling Croc
 
Join Date: Jun 2010
Posts: 22
Default PHPMailer Issues

I seem to be having weird issues with PHPMailer. I'm hoping someone can point me in the right direction...

I currently have VPS hosting.

I have a reservation system that sends out multiple emails after a ride is booked. 1 email to customer, 1 email to limo company, 1 email to a backup system, & 1 for text message alert

95% of the time, all of the emails go out successfully

5% (or less) some of the emails are not going out. For example, out of the 4 emails that's supposed to go out, 3 would go out and 1 would not.

All the emails are being sent from 1 PHP file. Here is the Command used to send off 1 of the 4 emails:

$sent = mail($to, $subject, $message, $headers) ;

Rest of the emails are being sent using the same command.

Anyone else experience this? Are there any settings in PHPMailer that I could check?

Thanks for any help anyone can provide!
Reply With Quote
  #2  
Old 09-07-2010, 09:23 PM
rec9140 rec9140 is offline
Junior Croc
 
Join Date: Jun 2007
Posts: 137
Default Re: PHPMailer Issues

put a sleep command in between each of the mail lines

like:

Code:
$sent = mail($to, $subject, $message, $headers) ;
sleep(5);
$sent = mail($to, $subject, $message, $headers) ;
Even on VPS your probably triggering Exims spam detection rule and it just starts dropping emails till you stop.

The sleep command will cause php to wait the specified number of seconds...
Reply With Quote
  #3  
Old 09-08-2010, 09:15 AM
sorathia sorathia is offline
Hatchling Croc
 
Join Date: Jun 2010
Posts: 22
Default Re: PHPMailer Issues

Quote:
Originally Posted by rec9140 View Post
Even on VPS your probably triggering Exims spam detection rule and it just starts dropping emails till you stop.
Is there a way to see the exims spam detection rule? And possibility modify it?

Thanks
Reply With Quote
  #4  
Old 09-08-2010, 09:25 AM
rec9140 rec9140 is offline
Junior Croc
 
Join Date: Jun 2007
Posts: 137
Default Re: PHPMailer Issues

Quote:
Originally Posted by sorathia View Post
Is there a way to see the exims spam detection rule? And possibility modify it?Thanks
Its the number of messages sent in a x time period that triggers this and once triggered till you stop it won't send mail out.

Your best to NOT change this as it just leads to your mail server getting blacklisted and once your on these lists.. most don't remove IP's or servers with out a lot of hassle.

Change your script to not send out as many emails that trigger this.

http://wiki.spry.com/Throttling_exim
Reply With Quote
  #5  
Old 09-08-2010, 10:09 AM
sorathia sorathia is offline
Hatchling Croc
 
Join Date: Jun 2010
Posts: 22
Default Re: PHPMailer Issues

Thanks rec9140 for your help!
I will add a sleep command to see if that fixes it.
Reply With Quote
  #6  
Old 09-08-2010, 12:24 PM
quietFinn's Avatar
quietFinn quietFinn is offline
Veteran Croc
 
Join Date: Feb 2005
Posts: 3,558
Default Re: PHPMailer Issues

Quote:
Originally Posted by rec9140 View Post
Its the number of messages sent in a x time period that triggers this and once triggered till you stop it won't send mail out.

Your best to NOT change this as it just leads to your mail server getting blacklisted and once your on these lists.. most don't remove IP's or servers with out a lot of hassle.

Change your script to not send out as many emails that trigger this.

http://wiki.spry.com/Throttling_exim
I don't think there is such a limit in Exim default configuration.
And the link you give is talking about totally different situations.


sorathia,
do you have cPanel/WHM in your VPS?
__________________
quietFinn - netFinn Finland
"Be who you are and say what you feel because those who mind don't matter and those who matter don't mind." - Dr. Seuss
Reply With Quote
  #7  
Old 09-08-2010, 11:00 PM
sorathia sorathia is offline
Hatchling Croc
 
Join Date: Jun 2010
Posts: 22
Default Re: PHPMailer Issues

Quote:
Originally Posted by quietFinn View Post

sorathia
,
do you have cPanel/WHM in your VPS?

quietFinn, Yes, I do have both cpanel and WHM access.

Is there anything I should check?

Thanks
Reply With Quote
  #8  
Old 09-09-2010, 03:10 AM
quietFinn's Avatar
quietFinn quietFinn is offline
Veteran Croc
 
Join Date: Feb 2005
Posts: 3,558
Default Re: PHPMailer Issues

Quote:
Originally Posted by sorathia View Post
quietFinn, Yes, I do have both cpanel and WHM access.

Is there anything I should check?

Thanks
Go to http://www.configserver.com/cp/cmq.html and download and install their ConfigServer Mail Queues (cmq).
That's the easiest way to check if your emails are actually in Exim's queue.
__________________
quietFinn - netFinn Finland
"Be who you are and say what you feel because those who mind don't matter and those who matter don't mind." - Dr. Seuss
Reply With Quote
  #9  
Old 09-09-2010, 08:51 AM
freeman's Avatar
freeman freeman is offline
Swamp Croc
 
Join Date: Jan 2006
Location: Montreal, QC, Canada
Posts: 308
Default Re: PHPMailer Issues

Quote:
Originally Posted by quietFinn View Post
Go to http://www.configserver.com/cp/cmq.html and download and install their ConfigServer Mail Queues (cmq).
That's the easiest way to check if your emails are actually in Exim's queue.
You can use:
Code:
exim -bpc #total emails in queque
exim -bp | exiqsumm #report about emails in queque
regards
__________________
Beneficium accipere, libertatem est vendere
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
has anyone tried to use phpmailer in hostgator? zulu6595 Suggestions 14 04-03-2011 07:44 PM
PhpMailer strange going-ons cleanxhost Shared Hosting Support 0 06-07-2010 11:22 AM
Mail sending using mail(), or phpmailer verlen Pre-Sales Questions 7 05-22-2009 07:20 PM

All times are GMT -5. The time now is 10:33 PM.