SMTP连接在localhost和hostgator上工作正常,但在服务器间出现错误

时间:2020-07-22 22:24:19

标签: php email smtp

错误:

Connection could not be established with host smtp.gmail.com :stream_socket_client(): unable to connect to ssl://smtp.gmail.com:465 (Connection refused)"
 "exception": "Swift_TransportException",
              "file": 
  

这是我的.env文件

MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=465
MAIL_USERNAME=myemail
MAIL_PASSWORD=mypasswaord
MAIL_ENCRYPTION=ssl

0 个答案:

没有答案