Looking for a Mailgun alternative that runs entirely on Cloudflare?
Self-hosted on Cloudflare, no per-email pricing, and a smaller, opinionated surface. Mailgun's breadth (optimization, validation, routes, lists) is more than most teams need once they're past MVP.
Mailgun is a great product — it's where most teams land the first time they need transactional email that "just works." But as your stack matures, the calculus often shifts: data residency requirements, predictable cost at higher volumes, and the desire to keep the email control plane on the same host as the rest of your infrastructure.
Flowmails is what you ship when those are the things you've started to care about. It runs on Cloudflare — the same one your Workers, R2 buckets, and Pages deployments already live in — and stores your inbox, outbox, and routing rules in your own D1. There is no per-email fee on top of Cloudflare's own pricing; the platform subscription is what you see on the /price page.
Mailgun's free tier is 100 emails/day for 1 month; paid plans start at $15 / month for 10,000 emails. Flowmails' Base plan is $0; Pro is $9.9 / month.
Mailgun is hosted — sign up, verify domain, call the API. Flowmails deploys into your Cloudflare account.
Mailgun: teams that need its deliverability tooling (inbox placement, validation) and its email-list / routes products. Flowmails: teams that want self-hosted email without the breadth.
Mailgun exposes both an HTTP API and an SMTP relay. Flowmails is REST-only. SDK-wise, the surface areas are similar (send / receive / stats).
Highlights
What Flowmails does differently
Data residency
Your D1 in your Cloudflare account
Inbound routing
Yes (route tables in your D1)
SMTP relay
No
Email validation
Not bundled
Mailing lists
No (transactional only)
Per-email pricing
No
Migration
How to migrate from Mailgun to Flowmails
Decide whether you need Mailgun's optimisation / validation products
If your team depends on Mailgun's inbox placement reports or email validation, plan for those independently — Flowmails doesn't bundle equivalents. If you only ever used Mailgun for send / receive, the migration is straightforward.
Move the domain to Cloudflare
Same prerequisite as every other self-hosted-on-Cloudflare flow: the zone must be on Cloudflare for Email Routing + Email Services to bind to it.
Replace the SDK
Swap Mailgun SDK calls for Flowmails SDK calls. Templates are plain HTML, so the renderer is unchanged. If you used Mailgun's inbound routes, port them into Flowmails' route tables (literal matchers, not regex).
FAQ
Common questions about switching from Mailgun
Other alternatives