PHPMailer Hangs on Send

走远了吗. 提交于 2019-12-01 04:36:29

Hijacking the post to say i had the same issue but had set the port to 465 without setting SMTPSecure to 'ssl' in the example its set TLS by default

sadly this probably won't ever help anyone else who has this same problem, but I was able to get everything working by just changing the port to 465.

Eventually found solution for my configuration.
Just add ssl:// to smtp.google.com
$mail->Host = 'ssl://smtp.gmail.com';

I had the same issue. Nothing display after the send method. I realized that the encryption was wrong, I did use SMTPS

$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
// Enable TLS encryption, `PHPMailer::ENCRYPTION_SMTPS` also accepted
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!