Mail::send() doesn't close smtp connection
[email protected] (Stepan Vorobyov) Sat, 17 Jan 2015 10:20:09 +0300
| Newsgroups | php.pear.general |
|---|---|
| Message-ID | <[email protected]> |
Hello! I use Mail::send() with smtp backend to send mails from php script on my FreeBSD server. It works fine when everyting is ok. But if there's an error (E.g. SMTP authentication failure) Mail::send() finishes with error and leaves tcp connection with smtp server open. Is this a feature or bug? My script tried to send thousands of mails and thus hit the system limit of open files (network connection is concidered as an open file). As a result other services (such as database) became unavailable too. So... Is it the right behaviour for Mail::send() not to close the connection? Thanks.