Search code examples
phpmailertls1.3

PHPMailer compatibility with TLS 1.3


I have a web application running the following specs:

  • Windows Server 2016
  • PHP 8.0.14

We're interested in upgrading to TLS 1.3 in the near future. We're aware this will necessitate upgrading the O/S to Server 2022. We'd like to verify PHPMailer 6.8.0 or later is compatible with TLS 1.3. If yes, directing me to the appropriate release notes would also be helpful.

I have located old threads that suggest PHPMailer is compatible, but with some configuration adjustments. Is this still necessary? https://stackoverflow.com/a/63234048/676923


Solution

  • I wrote that answer, and not much has changed. Note however that that question asked how to support TLSv1.3 to the exclusion of other versions, which is quite different to what you're asking.

    PHPMailer itself doesn't have any bearing on whether TLS versions are supported - that's entirely up to the the version of the openssl library that is loaded in your PHP runtime via the PHP openssl extension. This is why there is no mention of it in PHPMailer docs, because PHPMailer has no influence over it, and doesn't have to do anything to gain its support.

    In short, if your PHP build supports TLSv1.3, PHPMailer will support it without you having to do anything at all, and this has been true since PHP 7.4.