试图弄清楚为什么ForgotPassword在升级到5.3之后没有发送电子邮件 . 我已经通过PasswordBroker,User,CanResetPassword跟踪它,最后到了RoutesNotifications :: notify,它会进入服务容器,显然是在第21行 app(Dispatcher::class)->send([$this], $instance);
发送电子邮件实例,但是没有发送电子邮件......任何想法?
我正在使用MailGun驱动程序,并使用旧的邮件API,所有移植的代码仍在工作,只是重置密码使用新的通知API不是 .
我在 ResetPassword::toMail
中插入了一个存根,但它从不调用此方法:
public function toMail()
{
Log::info('toMail');
return (new MailMessage)
->line('You are receiving this email because we received a password reset request for your account.')
->action('Reset Password', url('password/reset', $this->token))
->line('If you did not request a password reset, no further action is required.');
}
1 回答
好的,我发现为什么它没有调用
ResetPassword::toMail
RoutesNotifications::routeNotificationFor
邮件密钥返回$this->email
,我们正在使用$this->username
.在翻阅代码之后再次阅读文档,因为我已经在我已经看过的文档中认识到了更多,现在 Headers 引起了我的注意,所以只需看一下就可以快速解决这个问题Customizing The Recipient