I run most of my small projects on Cloudflare’s free tier and have kept rebuilding transactional email integrations. I missed Laravel’s flexibility to switch providers without rewriting code.
So I put my AI agent to work and built 'Mailswitch'! 😅
Built for Cloudflare Workers, it supports Resend, Postmark, Amazon SES, SMTP, and more—with fallback, failure handling, and webhooks. No Node.js compatibility flags needed.
It also includes helpers for building a settings UI so SaaS tenants can connect their own email providers.
Less repeated work, more building. Give it a try and share your feedback! 🙏
https://github.com/me-shaon/mailswitch
GitHubGitHub - me-shaon/mailswitch: Transactional email library for Cloudflare Workers. Switch email providers without a code change or a redeploy. One API for Resend, Postmark, Amazon SES, SMTP, and more, with settings-screen tools.Transactional email library for Cloudflare Workers. Switch email providers without a code change or a redeploy. One API for Resend, Postmark, Amazon SES, SMTP, and more, with settings-screen tools....
commit 73c36e2
The failure case I’d want to test is a provider accepting the email but timing out before returning a response. How does fallback handle that ambiguity, and can the caller choose to pause rather than risk a duplicate send?