Skip to content
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

failover mail config does not catch AWS SES errors #48642

Closed
bchalier opened this issue Oct 5, 2023 · 1 comment · Fixed by #48645
Closed

failover mail config does not catch AWS SES errors #48642

bchalier opened this issue Oct 5, 2023 · 1 comment · Fixed by #48645

Comments

@bchalier
Copy link
Contributor

bchalier commented Oct 5, 2023

Laravel Version

10.19.0

PHP Version

8.2.6

Database Driver & Version

No response

Description

After setting-up SES and smtp drivers with failover in that order, I have an issue where AWS throw an error but laravel does not failover to stmp (when I disable ses I can confirm that smtp work properly).

I understand how to fix the misconfiguration on AWS but would expect laravel to failover in that case.

The error is thrown by \Illuminate\Mail\Transport\SesTransport::doSend() and is a simple \Exception

As I understand it the failover works by catching any error here \Symfony\Component\Mailer\Transport\RoundRobinTransport::send(), but because the error thrown does not implement \Symfony\Component\Mailer\Exception\TransportExceptionInterface it is not catched.

I can make a pull request to change the error thrown by the SES driver to be catched but would like to make sure first that it's the correct way to correct that.

Steps To Reproduce

Setup laravel in failover with multiple drivers, SES first, with valid AWS credentials but a wrong configuration.

In my case I have an unvalidated domain, therefore SES refuse to send from a not verified email address.

@github-actions
Copy link

github-actions bot commented Oct 5, 2023

Thank you for reporting this issue!

As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.

If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants