-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Comments
Would setting SMTPAutoTLS = false as default be a viable option? Or potentially echoing a message for users as feedback to include: |
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. |
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.
The text was updated successfully, but these errors were encountered: