2016-09-20 67 views
0

试图找出为什么忘记密码在升级到5.3后不会发送电子邮件。我已经通过PasswordBroker,用户,CanResetPassword,并最终通过RoutesNotifications :: notify将其追踪到服务容器中,并且显然在第21行app(Dispatcher::class)->send([$this], $instance);上发送电子邮件实例,但没有发送电子邮件......任何想法?Laravel 5.3升级忘记密码电子邮件从未发送过

我正在使用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.'); 
} 

回答

2

好吧,我发现它为什么不会调用ResetPassword::toMailRoutesNotifications::routeNotificationFor邮件键返回$this->email,和我们使用$this->username

翻阅代码后再次阅读文档,因为我更多地认识了我已经看到的文档,现在标题引起了我更多注意,所以只需看一下这个文档即可快速解决此问题Customizing The Recipient

+0

这是一个很好的发现。感谢分享 - 拯救了我! – mcnamee

+0

我有类似的问题,这个问题和答案不一定能解决它,但它指出我最终的方向。谢谢。 –

相关问题