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.';
}
The Mail::send() method doesn't return anything.
You can use the Mail::failures() (introduced in 4.1 I think) method to get an array of failed recipients, in your code it would look something like this.