Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix exception thrown for connection issue #4

Merged
merged 1 commit into from
Feb 25, 2021

Conversation

schreven
Copy link

Currently, if the smtp connection fails an exception will be thrown at line 344. It is something along the lines stream_set_timeout() expected object but got bool. Thus the connect() function throws an exception instead of returning false.

The consequence is that the smtp connection is not closed in PHPMailer::2051. Also the exception is not a ConnectivityException as should be the case through PHPMailer::1859 and Mailer::157.

The added piece of code I added is part of the latest stable release of PHPMailer so should be safe.

@bartbutler bartbutler merged commit 8524f78 into bartbutler:content-location Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants