Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Minor phpMailer issue with 'SMTPAutoTLS' #986
On Modern PHP versions, if you're creating a TLS connection the certificate needs to be valid, and will fail with an uninformative error if the certificate is incorrect
This bit me because the cerificate on our SMTP host is valid, but for development we refer to it as 'intmail' (10.x.x.x) not 'mail' (203.x.x.x). The certificate is only valid for 'mail'.
Because of this, I've explicitly disabled TLS, but, because the server still offers STARTTLS, the AutoTLS flag means that phpMailer tries to convert it to TLS, the certificate errors, and the connection is dropped.
I can't find the other issue, but there was this idea to have a setting to send all mail to some sort of log file in development. It would help all sort of issue with mail in development mode. For example, right now, we can't create users in development mode without email support. It also mean you can spam your user when testing something in development mode with a copy of the production db
EDIT : Interesting read :
In any case, the TLS error can also happen in production, so it's still valid.