Zend\Mail SMTP Fix Connection Handling #3561

merged 1 commit into from Jan 26, 2013


None yet

2 participants



Zend\Mail contains some issues for connection handling; generally most people will not run into this unless they utilize the SMTP transport in say a worker from a message queue. Take the scenario of your worker runs out of work and disconnects from the SMTP server; if you go to send the mail again (without manually handling all connection semantics) it will fail. Further, there is a bug where it attempts to lazily load the connection but if there is already a connection object it doesn't check the state.


There are no BC breaks

The unit test asset for the SMTP protocol spy was not in good shape itself; it did not properly call many methods that it was extending from. A new method is in the Smtp protocol called hasSession which contains the variable from our start session and stop session code.

Additionally the Smtp transport now checks for the existence of the connection object and the new hasSession status. The code has been slightly refactored to keep BC but also to keep code duplication down.

@weierophinney weierophinney added a commit that referenced this pull request Jan 26, 2013
@weierophinney weierophinney Merge branch 'hotfix/3561' into develop
Close #3561
@weierophinney weierophinney merged commit 68c818f into zendframework:develop Jan 26, 2013
@mwillbanks mwillbanks deleted the mwillbanks:hotfix/zend-mail-smtp-connection-handling branch Jan 29, 2013
@weierophinney weierophinney added a commit to zendframework/zend-mail that referenced this pull request May 14, 2015
@weierophinney weierophinney Merge branch 'hotfix/3561' into develop 818d7d9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment