Blog

/

How to send transactional email from your Cloudflare custom domain

Most teams reach for Mailgun, Postmark, or SES the moment they need to send email from hello@theirdomain.com. If your domain already lives on Cloudflare, that detour is unnecessary. This post walks through the path that keeps the whole pipeline inside your Cloudflare account.

The problem with most transactional-email providers

Mailgun, Postmark, and Amazon SES are excellent products. They are also a third-party mailbox, a third-party log retention policy, a third-party data processor you have to disclose in your privacy notice, and a vendor that can change pricing on you mid-quarter. For most product teams, that is overkill for what is, at heart, a single REST call.

If your domain is already on Cloudflare, the cleaner shape is: keep the DNS and the Worker where they are, and have the Cloudflare-native Email Services primitive send on your behalf from your domain.

The three pieces you actually need

Cloudflare Email Routing. Activated per zone. This is what catches inbound mail; for outbound it is the front door that ensures your domain is the one signing the message.

A Cloudflare Worker. Your service code that decides what to send and when. The Worker can be in your own account, in a Flowmails-provisioned account, or both — the point is it is code you control, not a vendor config screen.

Cloudflare Email Services. The primitive that takes a payload from the Worker and delivers it as a properly signed message. This is what replaces the SMTP relay in the old architecture.

The gotchas nobody mentions up front

Sender reputation lives on the zone. If you have been sending spam from a subdomain and then move the root domain over, you carry that history. Plan a warm-up window if your zone is fresh.

DKIM and DMARC are not optional. Cloudflare configures the DKIM record for you once you enable Email Services, but the DMARC record is your responsibility. Without it, inbox providers penalize you on the first complaint.

Attachments go through R2, not the body. The Worker receives attachments in a temporary store; you read them out, drop them into R2, and reference the R2 key in the outbox row. Designing for this from day one saves a refactor later.

Where Flowmails fits

Flowmails is the dashboard and REST surface that sits on top of those three pieces. It does not add a new mail server — it provisions the Worker in your Cloudflare account, points it at your D1 database, and exposes a clean API your service can call to send and receive.

If you want the same end state without writing the integration yourself, connect a Cloudflare account and Flowmails sets the whole thing up in about a minute. If you would rather wire it up by hand, the runtime tour walks through the same pieces from the other side.

Want this in your Cloudflare account by lunchtime?

Start free