Laravel Mail 设置 smtp ssl 后不能正常发送邮件
说明:Laravel 5.1 通过163邮箱的 smtp服务发送邮件,在不加密的情况下可以正常发送邮件,一旦使用ssl,配置如下:
MAIL_DRIVER=smtp
MAIL_HOST=smtp.163.com
MAIL_PORT=465
MAIL_USERNAME=******@163.com
MAIL_PASSWORD=*****************
MAIL_ENCRYPTION=ssl
就会发送失败,报下面的错:
Swift_TransportException in StreamBuffer.php line 269:
Connection could not be established with host smtp.163.com [ #0]
有谁遇到过这种问题,是不是服务器环境的问题?
ps: 服务器php openssl 是打开的
推荐文章: