How do I retry failed emails?
With Bull, set attempts: 3 and backoff: { type: 'exponential', delay: 5000 } in the job options. Bull retries 3 times with exponential backoff (5s, 10s, 20s). With SQS, failed messages return to the queue after the visibility timeout. Track permanently failed emails in a dead-letter queue.
Verify This Answer
Cross-check this information using these trusted sources:
More FAQs in Email Queues and Async Sending in Node.js Bull, SQS, and Background Jobs
Email queues provide faster HTTP responses (don't block on email sending), automatic retry on failure, rate limiting (SES has sending limits), priority (important emails first), persistence (survives restarts), and scalability (separate workers for email processing).
Install bull, create a Queue with Redis config, process jobs with emailQueue.process(async (job) => sendEmail(...)), add jobs with emailQueue.add({ to, template, data }, { attempts: 3, backoff: { type: 'exponential', delay: 5000 } }). Bull handles retry, persistence, and rate limiting.
The simplest approach: call sendEmail().catch(err => console.error(err)) without awaiting. The email sends in the background, and the HTTP response returns immediately. No retry, no persistence, but no extra dependencies. Good for small apps with low email volume.
Still have questions?
Browse all our FAQs or reach out to our support team
