How do I retry failed SES emails?
Implement retry with exponential backoff. Retry on ThrottlingException (429) with delays of 1s, 2s, 4s. Don't retry on MessageRejected or InvalidParameterValue (fix the issue instead). Use Bull queue for automatic retry with attempts and backoff settings.
Verify This Answer
Cross-check this information using these trusted sources:
More FAQs in Amazon SES Error Handling and Retries in Node.js Bounces, Complaints, and Failures
Invalid recipient (400, bad email format), sandbox restriction (453, unverified recipient), throttling (429, too many emails/second), authentication failed (403, wrong credentials), message rejected (554, spam content), bounce (recipient doesn't exist), and complaint (user marked as spam).
Set up SNS notifications in SES configuration sets. Create a webhook endpoint that receives SNS notifications. When a bounce occurs, parse the notification, extract the email address and bounce type. For permanent bounces, mark the user as emailBounced in your database and never send to them again.
Track bounces in your database (emailBounced: true, emailBouncedAt). Before sending, check canSendEmail(user) which returns false if user.emailBounced or user.emailComplained is true. Never send to bounced or complained addresses to protect your sender reputation.
Still have questions?
Browse all our FAQs or reach out to our support team
