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

Improve feedback on TLS errors #1405

Open
Synchro opened this issue Apr 4, 2018 · 2 comments
Open

Improve feedback on TLS errors #1405

Synchro opened this issue Apr 4, 2018 · 2 comments

Comments

@Synchro
Copy link
Member

Synchro commented Apr 4, 2018

By far the most common problem with PHPMailer is those running into issues with TLS, particularly the problem caused by gmail updating its certs to one signed with a relatively new CA that is not included in many older OS CA cert bundles. The errors generated when this happens are not especially clear, and though PHPMailer always provides a link to the troubleshooting guide which describes these issues and fixes for them in detail, that seems to be too difficult for many. It would be better to improve the error reporting at the point they occur, so for example if an SMTPS connection to port 465 fails, that it retrieves the underlying error and shows that, rather than a generic "connect failed". The messages generated via exceptions are slightly better in this area, but the regular error handling could do with improving to give better feedback.

@madbananaman
Copy link

Would setting SMTPAutoTLS = false as default be a viable option?

Or potentially echoing a message for users as feedback to include:
$mail->SMTPAutoTLS = false;

@Synchro
Copy link
Member Author

Synchro commented May 11, 2018

Not really. It would defeat the entire point of the setting. The idea is to work as well as possible with well-configured servers (which is most of them). If you have a defective server, it’s up to you to deal with it, not to degrade everyone else.

That’s not to say that error messages can’t be improved, as per my original comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants