Laravel 5.5-邮件不能与`mail`驱动一起使用 [英] Laravel 5.5 - mail not working with `mail` driver

查看:147
本文介绍了Laravel 5.5-邮件不能与`mail`驱动一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Laravel设置中,直到我将框架从5.4升级到5.5之前,邮件一直可以正常工作.现在,它总是在以下情况失败:

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:

请注意以下几点:

    本地环境上的
  1. 邮件服务器= http://www自5年以来,.toolheap.com/test-mail-server-tool/users-manual.html ive就这样使用(这是一次单击安装/无戏剧/无配置/无错误测试邮件服务器),直到昨天它仍然有效,因此我不会将其更改为其他内容
  2. 如果直接调用php的mail()函数,则可以正常工作
  3. 邮件驱动程序ive集仅为mail,但仍位于sendmail(您可以使用$ command并显示/usr/sbin/sendmail -bs)
  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)

这是邮件的.env:

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

那么有人知道如何解决这个问题吗?它只在laravel 5.5中出演过

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

非常感谢

推荐答案

找到了原因,因此不得不寻找替代解决方案.

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

[原因]: Swiftmailer不再支持mail传输

[Reason]: Swiftmailer no longer supports mail transport

(请参阅此处)

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

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

[解决方案]: 使用smtp代替mail.

这篇关于Laravel 5.5-邮件不能与`mail`驱动一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆