Re: mail() takes too much time
| From: | Colin Guthrie | Date: | Sun, 02 Sep 2007 14:50:52 +0000 |
| Subject: | Re: mail() takes too much time | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-261616@lists.php.net to get a copy of this message | ||
Stut wrote:
> Unless your script is actually hanging for the 4-6 hours this problem
> has nothing to do with PHP.
>
> How mail is delivered depends on the OS you are using, but usually it
> will get passed to a local MTA which then handles delivering it, at
> which point PHP involvement ends.
>
> I suggest you look at the Received headers in the messages your getting.
> You should be able to see which server is causing the delay.
Yup, 100% agree that it's not PHP.
Reasons for delays can include a dodgy ISP just taking a long time to
process things, or more typically some form of "greylisting" e.g. one
MTA deliberately telling the delivering MTA to P*ss off for a while -
compliant servers will resend the mail after a while at which point it
will be accepted. This is a spam prevention technique. See:
http://en.wikipedia.org/wiki/Greylisting
Col