Skip to content

Commit

Permalink
added EENVELOPE error
Browse files Browse the repository at this point in the history
  • Loading branch information
fomalhautb committed Feb 1, 2025
1 parent 3849400 commit d90128e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"deindented",
"EAUTH",
"EDNS",
"EENVELOPE",
"EMESSAGE",
"Falsey",
"frontends",
Expand Down
9 changes: 9 additions & 0 deletions apps/backend/src/lib/emails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,15 @@ export async function sendEmailWithKnownErrorTypes(options: SendEmailOptions): P
} as const);
}

if (responseCode === 554 || code === 'EENVELOPE') {
return Result.error({
rawError: error,
errorType: 'REJECTED',
canRetry: false,
message: 'The email server rejected the email. Please check your email configuration and try again later.\n\nError:' + getServerResponse(error),
} as const);
}

if (code === 'ETIMEDOUT') {
return Result.error({
rawError: error,
Expand Down

0 comments on commit d90128e

Please sign in to comment.