Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[12.x] Add the failed method to queued mailables. #10518

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

Open
wants to merge 1 commit into
base: 12.x
Choose a base branch
from

Conversation

kevinb1989
Copy link
Contributor

@kevinb1989 kevinb1989 commented Jun 21, 2025

A long time ago, I read the source code, found out the Illuminate\Mail\SendQueuedMailable::failed() method and realized it's possible to do this.

We have been doing this in production for years, notified of occasional email failures. Some example errors are:

"App\\Mail\\OrderDelayed has been attempted too many times or run too long. The job may have previously timed out."

"Expected response code \"250\" but got code \"221\", with message \"221 Closing connection. Waiting command exceed timeout. Please use NOOP for keeping idle connection.\"."

"Expected response code \"250\" but got empty code."

"Error executing \"SendRawEmail\" on \"https:\/\/email.us-east-1.amazonaws.com\"; AWS HTTP error: Client error: `POST https:\/\/email.us-east-1.amazonaws.com` resulted in a `400 Bad Request` response:\n<ErrorResponse xmlns=\"http:\/\/ses.amazonaws.com\/doc\/2010-12-01\/\">\n  <Error>\n    <Type>Sender<\/Type>\n    <Code>MessageReje (truncated...)\n MessageRejected (client): Sending paused for this account. For more information, please check the inbox of the email address associated with your AWS account. - <ErrorResponse xmlns=\"http:\/\/ses.amazonaws.com\/doc\/2010-12-01\/\">\n  <Error>\n    <Type>Sender<\/Type>\n    <Code>MessageRejected<\/Code>\n    <Message>Sending paused for this account. For more information, please check the inbox of the email address associated with your AWS account.<\/Message>\n  <\/Error>\n  <RequestId>request-id<\/RequestId>\n<\/ErrorResponse>\n"

Wording is a lot similar to this section for Queue.

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

Successfully merging this pull request may close these issues.

1 participant