beyondcode / laravel-mailbox

Catch incoming emails in your Laravel application
https://beyondco.de/docs/laravel-mailbox/getting-started/introduction
MIT License
1.03k stars 127 forks source link

Can't catch message using the Log driver #116

Open dgillier opened 1 year ago

dgillier commented 1 year ago

Hello, I'm trying to test this package using the Log driver.

I setup my Mail driver to use Log driver (and have correctly emails send by my app going to the log).

But can't catch any email...

.env:

MAILBOX_DRIVER=log
MAIL_MAILER=log

My boot in AppServiceProvider:

public function boot()
{
        Mailbox::catchAll(CatchAllMailbox::class);
}

And catchAllMailbox:

<?php

namespace App\Support;

use BeyondCode\Mailbox\InboundEmail;
use Illuminate\Support\Facades\Log;

class CatchAllMailbox
{
    public function __invoke(InboundEmail $email)
    {
        Log::info("mail catched");
    }
}

Any suggestion ?

Thanks, Denis