beyondcode / helo-laravel

HELO Laravel helper package to add
MIT License
87 stars 24 forks source link

Possible infinite loop detected in CreatesMailers trait #42

Closed schonhoff closed 7 months ago

schonhoff commented 1 year ago

Hello,

I'm sending out a mail to my user and after a short period of time I got a possible infinite loop detected by xdebug.

I tried sending out the test mail via php artisan helo:test and the response is

Sending a test mail to HELO.
Check in HELO if it arrived!

And the mail arrived in HELO. If I try to send a mail via the browser with

Route::get('test', function () {
    Mail::to('test@example.com)->send(new MyTestMail());
});

the infinite message is shown. Without XDebug active I will get a ERR_CONNECTION_RESET error. Here is the stacktrace: image

If I change the line 71 in the CreatesMailers.php to be

$symfonyTransport = $app['mailer']->getSymfonyTransport();

instead of

$symfonyTransport = $app['mail.manager']->getSymfonyTransport();

the mail will be send to HELO. Because I don't know if this is a good change to make, I won't open a PR for this.

Maybe someone can look into this.

Specs

Laravel Version: 10.9.0 BeyondCode HELO Version: 1.6.2.0 (Windows) BeyondCode HELO Version Package: 1.6.1 Operating System: Windows 11 PHP Version: 8.2.4 / 8.1.9 / 8.1.18 (all have the same problem) Xdebug Version: 3.2.0 Apache Version: 2.4.57.1 (WAMP) Chrome Version: 112.0.5615.138

If more infos are needed, I will try to provide them.

Others

I tried this in a fresh installed Laravel project, on a different computer (still Windows 11) and got the same result. On the 26th of April I could send mails without a problem to HELO but since yesterday I will get the error. I also tried different browsers (Chrome, Firefox, Edge) without success. Edit: I tried php artisan serve as well with the same result.

DougThwaites commented 1 year ago

Thanks for the write up @schonhoff I am facing the same issue.

With similar specs:

Laravel Version: 10.9.0 BeyondCode HELO Version: 1.6.2.0 (MacOS) BeyondCode HELO Version Package: 1.6.1 PHP Version: 8.2.5

If I find anything more i'll update this issue.

anand-patel commented 12 months ago

I am also facing the same issue.

antonioreyna commented 7 months ago

same here

octoxan commented 7 months ago

Same issue here, completely dead in Laravel 10 because of this

antonioreyna commented 7 months ago

I hope they fixe this as its not a free service...

mpociot commented 7 months ago

This should now be fixed, thanks @octoxan