PHP code example of highsolutions / laravel-mailer-daemon-catcher

1. Go to this page and download the library: Download highsolutions/laravel-mailer-daemon-catcher library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

highsolutions / laravel-mailer-daemon-catcher example snippets


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

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



namespace App\Listeners;

use HighSolutions\LaravelMailderDaemonCatcher\Events\MailerDaemonMessageReceived;

class MailerDaemonMessageListener
{

    public function __construct()
    {
        //
    }

    /**
     * Handle the event.
     *
     * @param  \HighSolutions\LaravelMailderDaemonCatcher\Events\MailerDaemonMessageReceived  $event
     * @return void
     */
    public function handle(MailerDaemonMessageReceived $event)
    {
        // Access the message using $event->message...
    }
}
bash
    php artisan mailer-daemon:catch