2

I´m trying to use redis queues to delay sending mail, but every time I get the error:

ErrorException: Undefined variable: errors in C:\wamp64\www\laravel\boltra\storage\framework\views\c653bafa95fad21933516563a0de08b10beb4f05.php:92

I´m using Laravel 5.8, so I´m pretty sure all my routes are inside the 'web' middleware group, and my email template is also correct. This works:

Mail::to($user->email)->bcc(env('MAIL_MY_EMAIL'))->send(new BienvenidoABoltra($user, 'bienvenida_e_autoregistro'));

These don´t:

Mail::to($user->email)->bcc(env('MAIL_MY_EMAIL'))->queue(new BienvenidoABoltra($user, 'bienvenida_e_autoregistro'));
Mail::to($user->email)->bcc(env('MAIL_MY_EMAIL'))->later($when, new BienvenidoABoltra($user, 'bienvenida_e_autoregistro'));

I tested redis with a simple logger and works fine too...

dispatch(function(){
  logger('Hola!!');
})->delay(now()->addSeconds(10));

What am I missing? Thanks a lot.

2
  • have you tried clearing the views cache? php artisan view:clear Commented Sep 25, 2019 at 1:26
  • Thanks @Kevin. I did, but still got the same result... other ideas? By the way, I´ve tried with different email templates, and none of them work when sent through the queue, even though they all work fine with a simple send(). Also, I don´t require the errors variable myself for any of those views, I´m guessing it´s a Laravel´s temp view looking for the system´s errors bag, and unable to find it. Commented Sep 27, 2019 at 0:21

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.