简体   繁体   English

为什么会出现Swift_TransportException:无法在Server中使用TLS加密进行连接?

[英]Why I'm getting Swift_TransportException: Unable to connect with TLS encryption in Server?

I have migrated to new server from old server. 我已经从旧服务器迁移到新服务器。 There are quite changes in new server. 新服务器中有很多更改。 Old server was using PHP 5.6 and phalcon 3.2 and new server is using PHP 7.3 & phalcon 3.4.4 . 旧服务器使用PHP 5.6和Phalcon 3.2 ,新服务器使用PHP 7.3和Phalcon 3.4.4

In old server email sending is working smoothly but in new server it's throwing the below error: 在旧服务器中,电子邮件发送工作正常,但在新服务器中,抛出以下错误:

Swift_TransportException: Unable to connect with TLS encryption Swift_TransportException:无法连接TLS加密

Server Mail configuration in both sites are: 两个站点中的服务器邮件配置为:

MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=myemail@gmail.com
MAIL_PASSWORD=mypassword
MAIL_ENCRYPTION=tls

NOTE: Old site was on http and new site is on https 注意:旧站点位于http ,新站点位于https

After 35 hours research and with the help of our great team finally found the solution :) 经过35个小时的研究,并在我们强大的团队的帮助下终于找到了解决方案:)

SMTP restriction was enabled on our server from WHM . 从WHM在我们的服务器上启用了SMTP限制 After disabling the SMTP restriction the error was gone. 禁用SMTP限制后,错误消失了。

You can find this in WHM by searching SMTP and it will be available under security center. 您可以通过搜索SMTP在WHM中找到它,并且可以在安全中心下找到它。 Disable it and this error will be no more. 禁用它,此错误将不再存在。

smtp限制快照

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM