Laravel 5.5 - mail not working with `mail` driver

拜拜、爱过 提交于 2020-01-24 10:14:11

问题


Ob my Laravel setup, mail was always working until I upgraded the framework to 5.5 (from 5.4). Now it always fail at the following:

Do note the following:

  1. mail server on local env = http://www.toolheap.com/test-mail-server-tool/users-manual.html ive used this like since 5yrs (this is a one-click-install/no-dramas/no-config/no-error test mail server) and till yesterday it worked so im NOT changing it to something else
  2. The php's mail() function works if called directly
  3. The mail driver ive set is just mail however it still goes here to sendmail (you can vardump the $command and it says /usr/sbin/sendmail -bs)

Here is the .env for mail:

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

So does anyone knows how to solve this? It only starred in laravel 5.5

Thanks a lot


回答1:


Found the reason and hence had to find an alternate solution.

[Reason]: Swiftmailer no longer supports mail transport

(See here)

https://github.com/swiftmailer/swiftmailer/issues/866

https://github.com/octobercms/october/issues/3256

[Solution]: Use smtp instead of mail.



来源:https://stackoverflow.com/questions/47666172/laravel-5-5-mail-not-working-with-mail-driver

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!