I am trying to send a email and show any errors if needed. The following code is sending a email and I am receiving it just fine. The issue though, is that when I do the check on the $sent var, it returns false for me.
Am I just missing something here? It might be because it's late. Who knows...
$sent = Mail::send('emails.users.reset', compact('user', 'code'), function($m) use ($user)
{
$m->to($user->email)->subject('Activate Your Account');
});
if( ! $sent)
{
$errors = 'Failed to send password reset email, please try again.';
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…