RE: [PHP-DEV] PHP 4.0 Bug #5729: mail stops connecting after sending 97 emails
| From: | Craig Vincent | Date: | Fri, 21 Jul 2000 21:16:25 +0000 |
| Subject: | RE: [PHP-DEV] PHP 4.0 Bug #5729: mail stops connecting after sending 97 emails | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-25386@lists.php.net to get a copy of this message | ||
> From: stefan@hendricks-online.de
> Operating system: WIN32, Win98
> PHP version: 4.0.1pl2
> PHP Bug Type: IMAP related
> Bug description: mail stops connecting after sending 97 emails
>
> for ($i=1; $i<=100; $i++)
> {
> mail("webmaster@hendricks-online.de", "Text", "Text");
> echo $i\x;
> }
>
>
> This will run until $i = 97. After that I get a error "Failed to
> connect...".
>
> This is reproduceable on 2 systems with 2 different remote
> mailservers or any local mailserver.
> It's no difference if the to-adressess are different in every mail.
I wouldn't consider that a bug....you're flooding your mail server with
emails...with a loop like that those 90+ emails would have been issued to
the mail server in only a couple seconds (which is not netiquette friendly).
Most versions of sendmail/qmail are configured to start rejecting messages
from being added too the queue if the load starts getting too high. My
suggestion is to add a delay into the loop so maybe it only sends out a
couple messages a second...that should resolve your problem. Or if you
insist on flooding reconfigure your mailing daemon to accept a higher load
of outgoing mail requests.
Sincerely,
Craig Vincent