Swift_TransportException Connection could not be established with host smtp.gmail.com

前端 未结 13 1255
别那么骄傲
别那么骄傲 2020-12-03 05:00

I can\'t figure for the life of me why exactly is it failing.. this is the exact error I am getting:

Fatal error: Uncaught exception \'Swift_TransportExcepti         


        
13条回答
  •  渐次进展
    2020-12-03 05:16

    Fatal error: Uncaught exception 'Swift_TransportException' with message 'Connection could not be established with host smtp.gmail.com [Connection refused #111]

    Connection refused is a very explicit and clear error message. It means that the socket connection could not be established because the remote end actively refused to connect.

    It's very unlikely that Google is blocking the connection.

    It's very likely that your web hosting provider has firewall settings that block outgoing connections on port 465, or that they are blocking SMTP to Gmail. 465 is the "wrong" port for secure SMTP, though it is often used, and Gmail does listen there. Try port 587 instead. If the connection is still refused, call your host and ask them what's up.

提交回复
热议问题