Laravel with Postfix

时间:2018-05-09 18:52:39

标签: laravel email postfix

我正在使用gsuite从laravel发送邮件,在.env上配置是:

 MAIL_DRIVER=smtp
 MAIL_HOST=smtp.gmail.com
 MAIL_PORT=465
 MAIL_USERNAME=account@gmail.com
 MAIL_PASSWORD=password123
 MAIL_ENCRYPTION=ssl

它工作正常,但现在我安装postfix作为send-only发送简讯并通过命令行进行测试,如下所示:

echo "Teste message" | mail -s "Title Message" any@email.com

它工作正常,但我不知道如何在laravel上使用它,应该是什么配置?我试过这个:

 MAIL_DRIVER=smtp
 MAIL_HOST=localhost
 MAIL_PORT=25
 MAIL_USERNAME=null
 MAIL_PASSWORD=null
 MAIL_ENCRYPTION=null

但它回归:

Swift_TransportException
Expected response code 220 but got code "", with message ""

0 个答案:

没有答案