-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loop on mail error #31
Comments
@elpoleto I will assume that you have queueing enabled, so that the error mails will be pushed onto it and then sent. If that's the case, Sneaker tries the following:
This should generally be avoided by the code in Sneaker.php:83 where the "try-catch" block catches the exception from Sneaker. But if the mail is sent via the queue, the mailer does not throw an exception. The only workaround I found is to parse the stack trace of the exception, look for "SquareBoat\Sneaker\ExceptionMailer" and then don't call app('sneaker')->captureException($e). EDIT: I think this could be fixed by removing the "Queueable" trait and the "ShouldQueue" interface from the "ExceptionMailer" class. |
Thanks, for now i resolved starting the queue work with 3 tries, so i got only 3 error and the the loop is blocked. |
@elpoleto The @codegain We cant remove the "ShouldQueue" interface as we want the mail to be sent using queue only. I don't find any good reason to remove it here. But making it configurable is much more appropriate. So will work on that soon or a PR is also welcomed. |
Hello. i use MS Azure as smtp and when some errors occour the sneaker jump in a infinite loop of errors tring to sends mails, for example:
or
my config capture is
'capture' => [ Symfony\Component\Debug\Exception\FatalErrorException::class, ],
but it goes in infinite loop
Any way to avoid that please?
The text was updated successfully, but these errors were encountered: