Home » Mail » Mail » Bug #5372
'persist' option, one error kills every call to send() afterwards
Details
| Submitted | 2005-09-12 18:11 UTC |
|---|---|
| From | Keith at AcademicKeys dot com |
| Assigned | jon |
| Status | Closed |
| Package | |
| PHP Version | 4.3.10 |
| OS | FreeBSD 4 |
| Roadmaps | (Not assigned) |
Comments
[2005-09-12 18:11 UTC] Keith at AcademicKeys dot com
Description:
------------
Using Mail 1.1.8 SMTP backend with "persist" set to true, and sending lots and lots of emails in a loop.
I ended up with an invalid email address in the middle of the mailing, Pear_Error -> getMessage() returns this:
Failed to send data [SMTP: Invalid response code received from server (code: 554, response: Error: no valid recipients)]
However, because I have the 'persist' option on, every email after this will not get sent because the SMTP server is now expecting a valid recipient, rather than starting over and trying to send the next entirely different message. The next error message I get is:
Failed to set sender: amccarthy@academickeys.com [SMTP: Invalid response code received from server (code: 503, response: Error: nested MAIL command)]
And then after that:
Failed to set sender: amccarthy@academickeys.com [SMTP: Invalid response code received from server (code: 421, response: Error: too many errors)]
And finally:
Failed to set sender: amccarthy@academickeys.com [SMTP: Invalid response code received from server (code: -1, response: )]
It seems like after one call to ::send() fails, it should reset and start an entirely new message. Alterntiavely, it would be helpful if there was a way to force the Mail class to disconnect and reconnect to the SMTP server to avoid this error ( other than just unset($mail_obj); $mail_obj = new Mail() ... )
Sorry if that was kinda confusing, a little bit hard to explain...
- Keith
[2006-12-13 18:17 UTC] jmwebm3 at aol dot com
I just installed the PEAR Mail package and I absolutely love it. Thank you to all who developed it.
I tried to research the advantage/disadvantage on performace for the persist => true option.
Does setting it to true increase performance since the connection does not renew while looping through emails?
Thanks.