Skip to content

Enhance MailService with provider resilience and delivery status trac…#1182

Open
GiftedGiftB wants to merge 1 commit into
Devsol-01:mainfrom
GiftedGiftB:AddMulti-Region/ProviderResilienceForEmailDelivery
Open

Enhance MailService with provider resilience and delivery status trac…#1182
GiftedGiftB wants to merge 1 commit into
Devsol-01:mainfrom
GiftedGiftB:AddMulti-Region/ProviderResilienceForEmailDelivery

Conversation

@GiftedGiftB

Copy link
Copy Markdown
Contributor

close #1134

PR Title

[Backend] Add Multi-Region/Provider Resilience for Email Delivery

PR Description

This PR improves the reliability of email delivery by introducing provider failover, retry handling, and delivery tracking for outbound mail. The change helps prevent notification and account-flow interruptions when a primary SMTP provider becomes unavailable.

What changed

  • Added MAIL_PROVIDERS to the environment validation schema in env.validation.ts.
  • Implemented a resilient mail delivery flow in mail.service.ts with retry and fallback behavior.
  • Introduced EmailDeliveryStatus to track attempts, provider selection, and final delivery outcome.
  • Added unit tests in mail.service.spec.ts to validate provider fallback behavior.
  • Added test-mailer-types.ts for MailerModule type exploration and compatibility checks.

Testing

  • Verified with:
    • cd backend && pnpm jest src/modules/mail/mail.service.spec.ts src/modules/admin/admin-users.service.spec.ts src/modules/reports/scheduled-report.service.spec.ts --runInBand

…king

- Added MAIL_PROVIDERS to env validation schema.
- Implemented sendMailWithResilience method for retrying email delivery.
- Introduced EmailDeliveryStatus for tracking email delivery attempts.
- Created unit tests for MailService to validate provider fallback behavior.
- Added test-mailer-types.ts for MailerModule type exploration.
@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nestera Ready Ready Preview, Comment Jul 1, 2026 9:25am

@drips-wave

drips-wave Bot commented Jul 1, 2026

Copy link
Copy Markdown

@GiftedGiftB Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

[Backend] -- Add Multi-Region/Provider Resilience for Email Delivery

1 participant