Skip to content

Conversation

@vbudhram
Copy link
Contributor

@vbudhram vbudhram commented Dec 15, 2025

Because

  • SES sends DeliveryDelay notifications for temporarily delayed emails, but FxA wasn't handling them
  • We need visibility into transient email delivery issues to monitor and improve email reliability

This pull request

  • Adds delivery-delay.ts module to handle SES DeliveryDelay notifications
  • Adds DELIVERY_DELAY_QUEUE_URL config option for the SQS queue
  • Integrates handler into email_notifications.js script
  • Logs delay details: email domain, delay type, diagnostic code, template, and expiration time
  • Adds StatsD metrics for tracking delays by type and template
  • Marks delayed emails in event logging for analytics

Issue that this pull request solves

Closes: https://mozilla-hub.atlassian.net/browse/FXA-12792

Checklist

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Screenshots (Optional)

N/A - Backend changes only

Other information (Optional)

  • Requires DELIVERY_DELAY_QUEUE_URL environment variable in deployment
  • SQS queue must be subscribed to SES DeliveryDelay notifications

@vbudhram vbudhram marked this pull request as ready for review December 17, 2025 17:29
@vbudhram vbudhram requested a review from a team as a code owner December 17, 2025 17:29
@vbudhram vbudhram self-assigned this Dec 17, 2025
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.

2 participants