barbushin / php-imap

Manage mailboxes, filter/get/delete emails in PHP (supports IMAP/POP3/NNTP)
MIT License
1.65k stars 459 forks source link

Temporary fix for `IMAP\Connection is already closed` #680 #690

Closed underdpt closed 1 year ago

underdpt commented 1 year ago

Hello,

This assumes that \imap_ping throwing ValueError: IMAP\Connection is already closed implies that there's no valid stream, and the library won't try to disconnect an already closed connection. This way the consumer doesn't have to handle this error.

See #680.