-
-
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
SMTP TLS on Windows not working (hang forever) #2958
Comments
TLS protocols don't work like that; it doesn't try different versions in order, but presents all the options as a list. It may be that your Windows machine has a buggy TLS implementation that breaks on some configs. There isn't a built-in way to change this, but you can achieve it by subclassing the SMTP class (like in this example), overriding the Short version: class mySMTP extends SMTP
{
public function startTLS()...
}
$mail = new PHPMailer();
$mail->setSMTPInstance(new mySMTP()); You can then carry on as normal. Note to myself; I need to update the override example to use |
Thank you |
Problem description
On windows (PHP 7.4 -> PHP 8.2) (no problem on Linux), sending a mail via SMTP with TLS (no problem with SSL) hang forever on stream_socket_enable_crypto in startTLS() in SMTP.php
I think this is because it use tls 1.0 first.
if i force crypto_method to tls 1.1 or 1.2, it works well :
Code to reproduce
The text was updated successfully, but these errors were encountered: