Design a transactional email system: applications enqueue messages with template, recipients, and variables. The service delivers via SMTP providers with retries, bounce handling, suppression lists, and basic analytics (sent, delivered, opened if tracked).
Functional requirements
- Enqueue send requests with template id and merge fields
- Support attachments size limits and inline images
- Track delivery status per recipient and surface webhooks to callers
- Maintain suppression list (bounces, complaints, unsubscribes)
Non-functional requirements
- At-least-once enqueue with idempotent send keys
- Provider rate limits respected with backoff
- PII minimization and encryption for recipient data at rest