phpmailer SMTP Error: Could not connect to SMTP host. 错误解决

时间:2022-08-12 18:12:44

今天发邮件遇到了这么一个问题:SMTP Error: Could not connect to SMTP host.在网上找了好多,都不管用。在这里我要提醒大家下

phpmailer SMTP Error: Could not connect to SMTP host. 错误解决

1.确保发送者邮箱密码正确,代码编写正确

我解决的办法是:、因为我用的是163smtp服务器,需要开启SMTP功能,并且设置SMTP授权码,这个授权码就是用来登录你邮箱的密码。发送邮件时候不能用原来的登录密码,得用这个授权码!

phpmailer SMTP Error: Could not connect to SMTP host. 错误解决

经过测试,再次刷新页面,发送成功

phpmailer SMTP Error: Could not connect to SMTP host. 错误解决

phpmailer SMTP Error: Could not connect to SMTP host. 错误解决