Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 8, 2020. It is now read-only.

Zend\Mail SMTP Fix Connection Handling#3561

Merged
weierophinney merged 1 commit into
zendframework:developfrom
mwillbanks:hotfix/zend-mail-smtp-connection-handling
Jan 26, 2013
Merged

Zend\Mail SMTP Fix Connection Handling#3561
weierophinney merged 1 commit into
zendframework:developfrom
mwillbanks:hotfix/zend-mail-smtp-connection-handling

Conversation

@mwillbanks
Copy link
Copy Markdown
Contributor

Overview

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.

Changes

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 added a commit that referenced this pull request Jan 26, 2013
@weierophinney weierophinney merged commit 68c818f into zendframework:develop Jan 26, 2013
@ghost ghost assigned weierophinney Jan 26, 2013
@mwillbanks mwillbanks deleted the hotfix/zend-mail-smtp-connection-handling branch January 29, 2013 16:34
weierophinney added a commit to zendframework/zend-mail that referenced this pull request May 14, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants