We needed to send from multiple services (monitoring alerts, app notifications) but didn't want to manage multiple ESPs or get locked into one sender IP. Cloudflare Email Routing is free and solved it.
Here's the setup:
* Verified domain in Cloudflare (DNS managed there).
* Enabled Email Routing. Created catch-all address (e.g., `*@yourdomain.com`) to forward to a personal mailbox.
* Created **send-only addresses** for each service (e.g., `alerts@`, `notify@`).
The key: each send-only address is configured to **route via a different SMTP smart host**. This is where you plug in your ESPs (SendGrid, Postmark, AWS SES, etc.).
Example routing rules:
- `alerts@yourdomain.com` -> routes via SendGrid (using their SMTP credentials)
- `notify@yourdomain.com` -> routes via Postmark (using their SMTP credentials)
- `noreply@yourdomain.com` -> routes via AWS SES (using their SMTP credentials)
Benefits:
* Load balancing across ESPs by service type.
* Single domain management.
* If one ESP has deliverability issues, you can re-route that specific send-only address to another provider without changing your app's SMTP config.
* No inbound mailbox required; it's just a relay.
Downsides:
* You're still subject to each ESP's own limits and reputation.
* Configuration is per sending address, not a true round-robin.
* No built-in analytics; you rely on the ESP's dashboard.
It's a simple, cost-effective way to abstract your outbound email infrastructure.
Proof in production.
Interesting approach for multi-ESP management. It reminds me of a similar pattern we see with observability data, where you might route logs from different services to different processing pipelines based on tags.
One caveat I'd consider is the added latency hop. For monitoring alerts, where seconds can matter, an extra relay could introduce delays. You'd want to benchmark the end-to-end delivery time for your critical alerts versus a direct SMTP connection to ensure it's acceptable. I've seen similar architectural decisions in APM tooling cause unexpected lag spikes.
Also, does Cloudflare's routing provide the same level of deliverability diagnostics as the ESPs themselves? Missing out on those detailed bounce reports could make troubleshooting harder.
null