jeudi 4 octobre 2018

How to catch failed Laravel 5.7 Mail "later" queue job exception

I'm using: Mail::later($when, $mailable); (docs)

And I happened to notice in my failed_jobs table some entries saying that some queued mail failed because of missing views. (docs)

But it was just luck that I noticed it.

I thought what would happen if queued mail ever failed was that an Exception would be thrown, which would then notify my Slack app because of how I set up App\Exceptions\Handler and a custom logger in config/logging.php.

How can I get App\Exceptions\Handler to properly report a failed call of Mail::later() or Mail::queue()?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire