PHPackages                             highsolutions/laravel-mailer-daemon-catcher - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. highsolutions/laravel-mailer-daemon-catcher

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

highsolutions/laravel-mailer-daemon-catcher
===========================================

A Laravel package for signalizing that sent e-mails couldn't be delivered

2.3.0(1mo ago)21.9k1MITPHPPHP ^8.3CI failing

Since May 23Pushed 1mo agoCompare

[ Source](https://github.com/highsolutions/laravel-mailer-daemon-catcher)[ Packagist](https://packagist.org/packages/highsolutions/laravel-mailer-daemon-catcher)[ RSS](/packages/highsolutions-laravel-mailer-daemon-catcher/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (12)Versions (16)Used By (0)

Laravel Mailer Daemon Catcher
=============================

[](#laravel-mailer-daemon-catcher)

[![License: MIT](https://camo.githubusercontent.com/c2bffd81d308ced1cc3b0d66fb0ed453ab478a5e17c988b780f9de986a390ee2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://opensource.org/licenses/MIT)

Singalizing that sent e-mail cannot be delivered to the recipient.

[![Laravel-Mailer Daemon Catcher by HighSolutions](https://raw.githubusercontent.com/highsolutions/laravel-mailer-daemon-catcher/master/intro.jpg)](https://raw.githubusercontent.com/highsolutions/laravel-mailer-daemon-catcher/master/intro.jpg)

Installation
------------

[](#installation)

This package can be installed through Composer:

```
composer require highsolutions/laravel-mailer-daemon-catcher
```

Or by adding the following line to the `require` section of your Laravel webapp's `composer.json` file:

```
    "require": {
        "highsolutions/laravel-mailer-daemon-catcher": "^2.0"
    }
```

And run `composer update` to install the package.

Usage
-----

[](#usage)

Check IMAP inbox
================

[](#check-imap-inbox)

To check is any unseen Mailer Daemon message in the inbox, execute this command:

```
    php artisan mailer-daemon:catch
```

Package gets configuration from `config/mail.php`.

We recommend add this command to `app/Console/Kernel.php` for scheduling this task:

```
	$schedule->command('mailer-daemon:catch')->hourly();
```

Handle Mailer Daemon messages
=============================

[](#handle-mailer-daemon-messages)

When command finds new messages, it will fire a `HighSolutions\LaravelMailderDaemonCatcher\Events\MailerDaemonMessageReceived` event.

To capture this event create a listener for this event in `App/Providers/EventServiceProvider.php`:

```
	protected $listen = [
		'HighSolutions\LaravelMailderDaemonCatcher\Events\MailerDaemonMessageReceived' => [
			'App\Listeners\MailerDaemonMessageListener',
		],
	];
```

In that example create a listener in `app/Listeners/MailerDaemonMessageListener.php` e.g.:

```
