

Laravel 9 单元测试报错 An email must have a “From” or a “Sender” header
source link: https://www.ixiqin.com/2022/02/21/laravel9-unittest-error-mail/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

在 Laravel 9 当中,引入了新的 Mailer 组件,随之而来的是一些过去没有的 Bug。
如果你在开发过程中出现了 An email must have a "From" or a "Sender" header
的报错,需要在 PHPUnit 当中配置 MAIL_FROM_ADDRESS 属性,用于通过测试。
<env name="MAIL_FROM_ADDRESS" value="[email protected]" />
本条目发布于2022年2月21日。属于Laravel分类,被贴了 Laravel、PHP 标签。
← Gutenberg 编辑器带来的模式变更 找到对的问题 →
发表评论 取消回复
您的电子邮箱地址不会被公开。 必填项已用*标注
评论 *
显示名称 *
电子邮箱地址 *
网站地址
在此浏览器中保存我的显示名称、邮箱地址和网站地址,以便下次评论时使用。
如果有人回复我的评论,请通过电子邮件通知我。
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK