mail() works fast on some servers 12 hour delay on others

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kubicka
Forum Newbie
Posts: 2
Joined: Mon Jun 12, 2006 11:10 pm

mail() works fast on some servers 12 hour delay on others

Post by kubicka »

PHP mail() works fast on some servers, 12 hour delay on others. . .

Anyone know why this is? I think is has something to do with sending from the root account. Can anyone tell me how to make this as fast as possible? The delay is killing our customer response and support. I have been using Powweb hosting for a while but the new site in on Register.com servers, and the same scripts I have been using before are now painfully slow. Any insight appreciated.

Thank you in advance,
David Kubicka
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

It can easily be due to the relays the message is passing through. The more busy a server is, the longer your message will take to process, especially if the server gives priority to mail from specific sources. There's also spam filtering that may slow it down some.
kubicka
Forum Newbie
Posts: 2
Joined: Mon Jun 12, 2006 11:10 pm

Post by kubicka »

feyd wrote:It can easily be due to the relays the message is passing through. The more busy a server is, the longer your message will take to process, especially if the server gives priority to mail from specific sources. There's also spam filtering that may slow it down some.
Yeah I figured that, but a 12 hour delay? That is totally ridiculous. Shouldn't be mroe 20 minutes, don't you think? Some one told me I need to send it through an existing account?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I've had, previously, emails that'd arrive at least 3 hours and as many as 2 days after being sent. As far as I know, it's a pretty standard "problem" between systems.
User avatar
bokehman
Forum Regular
Posts: 509
Joined: Wed May 11, 2005 2:33 am
Location: Alicante (Spain)

Post by bokehman »

This is pretty easy to understand. Let's quickly examine the 2 mail exchangers.

Mail exchanger 1 (receiving): maximum number of active connections: 50
Mail exchanger 2 (sending): retry period (minutes): 15

If mail exchanger 1 is busy and already has 50 active connections it will ignore any connection attempt made by mail exchanger 2. In this situation mail exchanger 2 will retry in 15 minutes. This situation will continue until the mail has been sent or mail exchanger 2 has reached its maximum number of retries after which it will take whatever action it has been pre-programmed to take.

As can be seen from this, it is not the journey time that is extensive, but the time spent revolving on a hard drive waiting for the next retry.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

I think the give-up period is usually about 72 hours but it's configurable. Hotmail and Gmail servers are both busy.
Post Reply