Mailcoach is a self-hosted email list manager. It integrates with services like Amazon SES, Mailgun or Sendgrid to send out mailings affordably.

If you're using Laravel, you can learn the techniques we used to create Mailcoach in your own projects by watching the Mailcoach video course.

Get notified when a queued job fails

Link –

Laravel provides excellent support for queued jobs. It's very easy to put something on a queue and out of the box a lot of queue backends such as Beanstalkd, SQS and Redis are supported. Most of the time queued jobs will perform their job without any problem. But have you considered that a queued job can fail too?

Laravel can create a failed jobs table and write a record when a queued jobs fails. There is even a command to retry a failed job:

php artisan queue:retry 5

That's nice! But how do you know if there is a job that failed? Sure you could check the failed jobs table from time to time, but I promise you after a while you won't do that anymore. If you have many applications, checking all those failed job tables will get downright tedious.

To get notified when a queued job fails our intern Jolita created a package called failed job monitor. It hooks into the JobFailed-event Laravel 5.2 fires when a queued job fails. Once it is installed you will receive a mail whenever this event occurs. Integration with Slack comes built-in as well. Here's how a Slack notification looks like:

failed job

Read the full instructions on how to install and use it on GitHub.

Stay up to date with all things Laravel, PHP, and JavaScript.

Follow me on Twitter. I regularly tweet out programming tips, and what I myself have learned in ongoing projects.

Every two weeks I send out a newsletter containing lots of interesting stuff for the modern PHP developer.

Expect quick tips & tricks, interesting tutorials, opinions and packages. Because I work with Laravel every day there is an emphasis on that framework.

Rest assured that I will only use your email address to send you the newsletter and will not use it for any other purposes.