The system
How the system worksThe DirectoryDispatchThe LedgerAI modelsAI agentsYour installationThe appThe research libraryWhat changes for your businessUse it from your softwareEverything it can do
Messaging
iMessageWhatsApp
Ads and leads
AdsCreativeLeads
Devices
Devices
Industries
RealtorsRestaurantsHome services
Explore
How it worksPermissions and limitsCompareSet upQuestionsText me

Cloudflare email is three products, not one mail stack

A practical guide to Email Routing, Email Workers, and Email Service: DNS, MIME parsing, R2 attachments, outbound limits, deliverability, costs, and the ESP boundary.

Cloudflare email is three products, not one mail stack

Cloudflare can forward inbound mail, run code on it, and send transactional mail. Each capability has a different setup gate. A verified forwarding address is not an onboarded sending domain.

Product surfaceDirectionWhat it doesPrerequisiteWhat it does not replace
Email RoutingInboundMaps an address or catch-all to a verified destination or WorkerDomain onboarded for routing; routing MX, SPF, and DKIM recordsA mailbox, outbound sender, campaign system
Email WorkersInbound, plus constrained reply/forwardRuns an email() handler over the raw messageActive route bound to a deployed Worker; destinations verified before forwardingGeneral arbitrary outbound on the free plan
Email Service / Email SendingOutboundSends transactional mail through a Worker binding, REST, or SMTPSending domain onboarded; Paid plan for arbitrary recipients; send_email binding for WorkersMarketing automation, customer subaccounts, full ESP operations

Verified destinations are free on every plan; arbitrary recipients require Workers Paid. Paid includes 3,000 outbound messages per account each month, then costs $0.35 per 1,000. Inbound is unlimited, although processing consumes Worker resources.

Evidence status

Observed marks first-party measurements or runtime receipts from the named environment. Derived marks arithmetic calculated from cited inputs. Specified marks vendor or standards documentation. Implemented and deployed name code and live-state evidence, respectively. Reproduced means the stated procedure was rerun. Externally attested marks operator reports; those reports show that an experience occurred, not that it is universal.

The setup begins with DNS, not code

For inbound routing, the dashboard path is:

Cloudflare dashboard → account → Compute → Email Service → Email Routing → Onboard Domain

For example.com, Cloudflare creates this root-domain shape:

txt
MX  @  route1.mx.cloudflare.net
MX  @  route2.mx.cloudflare.net
MX  @  route3.mx.cloudflare.net
TXT @  "v=spf1 include:_spf.mx.cloudflare.net ~all"
TXT cf2024-1._domainkey  "v=DKIM1; h=sha256; k=rsa; p=<Cloudflare public key>"
Line 5, Column 1txt

Cloudflare assigns MX priorities. Merge the Cloudflare include: into an existing SPF record; two SPF records are invalid, and SPF has a ten-lookup ceiling.

For outbound Email Sending, onboarding is separate:

Cloudflare dashboard → account → Compute → Email Service → Email Sending → Onboard Domain

The outbound records live under cf-bounce.example.com, leaving the inbound root MX records alone:

txt
MX  cf-bounce  route1.mx.cloudflare.net
MX  cf-bounce  route2.mx.cloudflare.net
MX  cf-bounce  route3.mx.cloudflare.net
TXT cf-bounce  "v=spf1 include:_spf.mx.cloudflare.net ~all"
TXT cf-bounce._domainkey  "v=DKIM1; h=sha256; k=rsa; p=<Cloudflare public key>"
TXT _dmarc  "v=DMARC1; p=none; rua=mailto:dmarc@example.com"
Line 6, Column 1txt

Cloudflare says DNS commonly settles in 5–15 minutes but can take up to 24 hours. The practical gate is that the Email Sending screen shows the domain onboarded and DNS queries return the records. Start DMARC at p=none if other providers still send for the domain; enforce only after their identities align.

Routing rules, verified destinations, and the catch-all

Forwarding requires a destination address that the recipient has verified. The dashboard path is:

Compute → Email Service → Email Routing → Destination Addresses

Cloudflare emails that address a verification link. A routing rule pointing at an unverified destination remains disabled. Once verified, create a rule under:

Compute → Email Service → Email Routing → Routing Rules → Create routing rule

The action is send to a verified address, send to a Worker, or drop. If two rules use the same pattern, only the first processes the message. Renaming a Worker breaks routes that point to its old name.

The catch-all is a separate rule on the Routing Rules screen. Turn it on, choose Send to a Worker, select the deployed Worker, and save. It catches every otherwise-unmatched local part, so add size checks, sender policy, and retention.

IntentRouteDestination
Ordinary inbox aliashello@example.comVerified personal or team inbox
Support ingestionsupport@example.comEmail Worker
Per-customer intakeinbox+customer-id@example.comEmail Worker with subaddressing enabled
Any unmatched local partCatch-allWorker, then explicit allow/reject logic
Address that should appear valid but retain nothingNamed ruleDrop

With subaddressing enabled, inbox+acme@example.com matches inbox@example.com while preserving +acme in message.to.

A runnable inbound Worker that parses MIME and stores attachments

The useful inbound architecture is short:

Cloudflare MX → Email Routing catch-all → email() handler → postal-mime → R2 objects + application record

Install postal-mime, bind an R2 bucket, and deploy the Worker:

bash
npm install postal-mime
npx wrangler r2 bucket create inbound-attachments
npx wrangler deploy
Line 3, Column 1Shell Script
jsonc
{
  "name": "inbound-mail",
  "main": "src/index.ts",
  "compatibility_date": "2026-07-01",
  "r2_buckets": [
    { "binding": "ATTACHMENTS", "bucket_name": "inbound-attachments" }
  ]
}
Line 8, Column 1jsonc
ts
import PostalMime from "postal-mime";

interface Env {
  ATTACHMENTS: R2Bucket;
  FORWARD_TO: string;
}

function safeName(name: string): string {
  return name.replace(/[^a-zA-Z0-9._-]/g, "_").slice(0, 180);
}

export default {
  async email(message: ForwardableEmailMessage, env: Env): Promise<void> {
    if (message.rawSize > 25 * 1024 * 1024) {
      message.setReject("Message exceeds the 25 MiB inbound limit");
      return;
    }

    const parsed = await PostalMime.parse(message.raw);
    const received = new Date().toISOString();
    const mailId = crypto.randomUUID();

    for (const [index, attachment] of (parsed.attachments || []).entries()) {
      const filename = safeName(attachment.filename || `attachment-${index}`);
      const key = `mail/${received.slice(0, 10)}/${mailId}/${filename}`;

      await env.ATTACHMENTS.put(key, attachment.content, {
        httpMetadata: {
          contentType: attachment.mimeType || "application/octet-stream"
        },
        customMetadata: {
          envelopeFrom: message.from,
          envelopeTo: message.to,
          subject: (parsed.subject || "").slice(0, 500)
        }
      });
    }

    await message.forward(env.FORWARD_TO);
  }
} satisfies ExportedHandler<Env>;
Line 41, Column 1TypeScript

message.raw is a single stream. If two consumers need it, buffer once with new Response(message.raw).arrayBuffer(). The handler also exposes envelope addresses, headers, size, setReject(), forward(), and reply().

postal-mime handles multipart boundaries, encodings, and character sets. Treat filenames and MIME types as untrusted. Generate the key, cap size, and scan before serving.

One operator reports: “I’m using Cloudflare Email Routing with a catch-all address that triggers a Worker. The Worker parses the email and stores the attachments in R2.” It is one working implementation, not a universal guarantee.

For the storage half, see R2 cuts a 10 TB delivery bill from $923 to $18.45. That chapter covers binding calls, public versus private objects, versioning gaps, and cost.

Replying is not the same as arbitrary sending

The inbound message object can forward to verified routing destinations. It can also reply with a raw EmailMessage constructed from cloudflare:email:

ts
import { EmailMessage } from "cloudflare:email";
import { createMimeMessage } from "mimetext";

export default {
  async email(message: ForwardableEmailMessage): Promise<void> {
    const msg = createMimeMessage();
    msg.setSender({ name: "Example support", addr: "support@example.com" });
    msg.setRecipient(message.from);
    msg.setSubject("Re: " + (message.headers.get("subject") || "your message"));
    msg.addMessage({
      contentType: "text/plain",
      data: "We received your message."
    });

    const reply = new EmailMessage(
      "support@example.com",
      message.from,
      msg.asRaw()
    );
    await message.reply(reply);
  }
};
Line 22, Column 1TypeScript

This is tied to the inbound message. message.reply() throws above 100 References entries, and forwarding destinations must be verified.

New outbound mail uses Email Service

After onboarding, bind Email Service to a paid Worker:

jsonc
{
  "send_email": [
    { "name": "EMAIL" }
  ]
}
Line 5, Column 1jsonc

Call env.EMAIL.send() with an onboarded-domain from, recipient objects, subject, text, and HTML.

The prerequisite chain is:

  1. The zone is in the Cloudflare account.
  2. Email Sending shows the domain as onboarded.
  3. The cf-bounce MX, SPF, DKIM, and DMARC records resolve.
  4. The Worker is on Workers Paid for arbitrary recipients.
  5. The Worker has a send_email binding and uses the onboarded domain in from.
  6. The message stays inside recipient, header, and size limits.

Before onboarding, sends are limited to verified destinations and routing domains. After onboarding, arbitrary recipients are allowed, subject to daily quota and reputation. New accounts start with a conservative quota that Cloudflare adjusts over time rather than publishing one universal number.

Current limits include 50 combined recipients, 998 subject characters, 16 KB of custom headers, and 5 MiB total. Verified-destination mail may be 25 MiB. A zone may have 30 combined Routing and Sending domains; Routing allows 200 rules per domain and 200 verified destinations per account.

The site's own split proves why the prerequisite must be visible

This build has a Pages endpoint at POST /api/email/send. It authenticates the owner, then proxies the body to a sibling Worker because Pages cannot carry the send_email binding. The sibling declares:

toml
[[send_email]]
name = "EMAIL"
Line 2, Column 1toml

The public diagnostic response currently says:

json
{
  "inbound": {
    "loop@miscsubjects.com": "forward → owner@redacted",
    "build@miscsubjects.com": "worker → ledger + forward"
  },
  "sending": "Enable Email Sending on miscsubjects.com in CF dashboard (Pages cannot bind send_email)"
}
Line 7, Column 1JSON

Code and a binding are not proof of a send-capable domain. The prerequisite remains open until onboarding and an observed delivery receipt.

On July 26, 2026, miscsubjects.com resolved three Cloudflare routing MX records, root SPF, cf2024-1 DKIM, and DMARC p=reject. The sending selector also returned a key, but DNS alone does not prove onboarding or delivery. No email was sent.

SPF, DKIM, DMARC, and ARC in plain language

MechanismWhat it assertsWhat forwarding changes
SPFThe connecting server is authorized for the envelope sender's domainA forwarder connects from a new IP, so the original SPF relationship can break
DKIMA domain signed selected headers and body bytes with a key published in DNSIt can survive forwarding if the signed bytes remain intact
DMARCThe visible From: domain must align with a passing SPF or DKIM identity, then applies a policyForwarding can disturb SPF; mailing-list or gateway modifications can disturb DKIM
ARCIntermediaries preserve a signed chain of the authentication result they observedA destination can evaluate the forwarder's attestation when direct SPF or DKIM no longer tells the whole story

Cloudflare uses Sender Rewriting Scheme, changing the envelope sender so SPF can pass from its relay while leaving visible From: unchanged. Routing adds DKIM, and ARC preserves authentication results through the forwarding hop.

ARC is evidence, not an override switch. The final provider still applies its own reputation, block-list, policy, and content decisions. A message can authenticate and still be rejected or placed in spam.

The Outlook reports are real, but they are not a universal result

Two independent operator reports describe Microsoft blocking Cloudflare Email Routing IP ranges. Handy-Man writes that Outlook “just blocks Cloudflare IP ranges and emails never get routed to my Outlook mail box.”

In a separate discussion, doubled112 reports that Microsoft “intermittently block Cloudflare email routing IPs too,” despite the surrounding SPF, DKIM, and DMARC work.

A third independent account documents Outlook failures through Cloudflare routing.

These reports establish a failure mode, not prevalence. Shared relays can inherit reputation from other traffic. Authentication improves identity evidence; it does not require a provider to accept an IP.

When forwarded mail disappears, inspect the Email Routing activity log first. Separate these cases:

SymptomLikely causeCheckFix
Rule is disabledDestination never verifiedDestination Addresses statusResend verification and activate the rule
No routing eventMX or rule mismatchdig MX, rule order, exact recipientFinish onboarding; repair the pattern
Worker invocation failedCPU, memory, exception, or renamed WorkerWorkers logs; route targetFix the exception or rebind the renamed Worker
Forward call rejectsDestination is not verifiedDestination list and Worker logVerify the exact address before forwarding
Routing says delivered, inbox has nothingDestination provider rejected, deferred, or filtered itRouting activity, SMTP response, spam/quarantineTest another verified destination; give Cloudflare the event and SMTP evidence
Sending call succeeds but Routing summary says “dropped”Outbound Worker mail is shown that way in RoutingEmail Sending metrics and logsUse Email Sending observability, not the Routing label
Local attachment test throws Cannot serialize value: [object ArrayBuffer]Local runtime limitationReproduce on deployed WorkerTest binary attachments against the deployed Worker
Reply throws on a long threadMore than 100 References entriesCount References valuesStart a new message or trim the reply path

Cloudflare warns about multiple SPF records, missing selectors, alignment, new-domain reputation, bounces, and provider filtering. Binary attachments can also hit a local ArrayBuffer serialization limit even when deployment works.

One developer followed the cloudflare:email and EmailMessage path, verified an address, and reported no arrival or error. The unanswered report cannot establish cause. It does show why a resolved Promise is not delivery proof. Check destination verification, onboarding, Email Sending logs, spam, quarantine, and SMTP events.

Where Cloudflare Email Service still is not SendGrid

Transactional sending is not the whole ESP product.

One SendGrid operator creates subaccounts by API so customers can verify their own domains with DKIM and SPF. Cloudflare's documented flow onboards zones from its account; it does not document an equivalent delegated subaccount system. Do not promise one without a specific API and proof.

The gaps are operational: durable bounce handling, suppression recovery, versioned templates, tenant analytics, and marketing consent or unsubscribe controls. Conservative daily quotas, reputation scaling, 50 recipients per message, and the limit-increase process keep “transactional” a real boundary.

A project can build those layers on Workers, D1, R2, and Queues. One operator is building an AGPL email platform in each user's Cloudflare account. Once those layers are included, the work is an email product, not a send call.

Cost is attractive; replacement scope is the constraint

At current list price, Cloudflare Paid includes 3,000 outbound messages monthly and charges $0.35 per 1,000 after that.

Outbound transactional volumeCloudflare Email Service usage lineWhat the arithmetic excludes
3,000/monthIncluded in Workers PaidPaid plan itself; application work
10,000/month$2.45 above the included 3,000Templates, bounce workflow, analytics
100,000/month$33.95 above the included 3,000Reputation operations and support
1,000,000/month$348.95 above the included 3,000Quota approval and product controls

The formula is max(0, messages - 3,000) / 1,000 × $0.35. Accepted hard bounces count; API-boundary rejections do not. Verified-destination sends are free.

Resend packages volume with retention, domain, team, and feature limits. Compare the operating requirement, not only cost per thousand.

Cloudflare's price works best for receipts, password resets, alerts, and other application mail from one owned domain. Customer-domain onboarding, mature suppressions, templates, analytics, and marketing change the comparison.

The decision table

WorkloadBest first choiceWhy
Receive-only aliases into an existing inboxEmail RoutingNo mailbox migration; verified forwarding destination
Receive and inspect, reject, archive, or branchEmail Routing → Email WorkerCode runs at the SMTP ingress and can store to R2
Inbound email webhook with attachmentsCatch-all or named route → Worker → parser → private R2One event path; binary payload leaves D1
Transactional mail from one owned domainEmail Service on Workers PaidOnboarded domain, low unit price, native binding
Send only to a few fixed internal addressesVerified destinationsFree, constrained anti-abuse path
Customer-owned sending domains and subaccountsEstablished ESP until proven otherwiseTenant onboarding and reputation boundaries are product features
Marketing campaigns and newslettersMarketing ESPConsent, unsubscribe, segmentation, templates, analytics
Full hosted mailbox with IMAP, folders, search, calendarsMail providerCloudflare Email Service is transport and compute, not a mailbox

Migrate in the same order: verify inbound routing and destination receipt, then the Worker and stored R2 objects. Onboard sending separately and keep the ESP until bounces, suppressions, quotas, logs, and delivery have owners.

The final test is one real message in, the intended Worker invocation, the expected object or forward, and the result at the destination. Outbound needs the production send plus recipient delivery. Until then, it is configured, not proven.

3 products
Routing, Workers, and outbound Email Service have separate gates
3,000
outbound messages included monthly on Workers Paid
$0.35
per 1,000 outbound messages after the allowance
5 MiB
maximum arbitrary-recipient message size
25 MiB
inbound and verified-destination message size ceiling
I’m using Cloudflare Email Routing with a catch-all address that triggers a Worker. The Worker parses the email and stores the attachments in R2.— emiliano, Hacker News
References (20)
  1. Email Service pricing — Cloudflare, Jul 26, 2026“Workers Paid 3,000 included per month, then $0.35 per 1,000 emails”
  2. Email Service troubleshooting — Cloudflare, Jul 26, 2026“Having multiple SPF records on your domain is not allowed and will prevent Email Service from working properly.”
  3. Email Service domain configuration — Cloudflare, Jul 26, 2026“Before using Email Sending, configure your domain.”
  4. Email routing rules and addresses — Cloudflare, Jul 26, 2026“Until a destination address is verified, any routing rule that points to it stays disabled.”
  5. Email handler Workers API — Cloudflare, Jul 26, 2026“Use postal-mime to parse the MIME structure of an incoming email.”
  6. postal-mime source repository — Postal Systems, Jul 26, 2026“PostalMime is a browser-friendly and serverless email parser.”
  7. Show HN: Webhook API – inbound email –> webhook — Hacker News, Apr 28, 2026“I’m using Cloudflare Email Routing with a catch-all address that triggers a Worker. The Worker parses the email and stores the attachments in R2.”
  8. Email Service limits — Cloudflare, Jul 26, 2026“Reply References entries 100”
  9. Email Service quotas and onboarding limits — Cloudflare, Jul 26, 2026“Before you onboard a sending domain, you can send emails only to verified destination addresses in your account.”
  10. Live miscsubjects email endpoint — miscsubjects.com, Jul 26, 2026“Enable Email Sending on miscsubjects.com in CF dashboard (Pages cannot bind send_email)”
  11. Live DNS measurement — miscsubjects.com, Jul 26, 2026“miscsubjects.com resolved route1, route2, and route3.mx.cloudflare.net plus SPF, DKIM, and DMARC on 2026-07-26.”
  12. Email Service postmaster reference — Cloudflare, Jul 26, 2026“ARC allows intermediate email servers, such as forwarders, to attach a record of the original authentication results to a message.”
  13. Cloudflare Email Service: private beta — Hacker News, Sep 25, 2025“Cloudflare's email routing has been abused by malicious users for so long that I can no longer reliably use it with my domain, most times Outlook just blocks Cloudflare IP ranges and emails never get routed to my Outlook mail box.”
  14. DKIM2 and DMARCbis Have Landed — Hacker News, Jul 8, 2026“They intermittently block Cloudflare email routing IPs too. All of these security measures and still it comes down to the IP address of your sender.”
  15. When things start to fail: Cloudflare Email Routing — Dariusz Więckiewicz, Sep 29, 2025“Microsoft is blocking some of Cloudflare's outgoing Email Routing servers.”
  16. Cloudflare Email Service troubleshooting — Cloudflare, Jul 26, 2026“Cannot serialize value: [object ArrayBuffer]”
  17. Cannot send emails from Cloudflare worker — Stack Overflow, Aug 12, 2025“I have following code which handles contact form submission which was created with the help of docs, but emails are not getting delivered. I have verified email address in Email routing.”
  18. Cloudflare Email Service: private beta — Hacker News, Sep 25, 2025“We use sendgrid today, and create subaccounts through it (entirely with API calls) to allow our customers to add and verify their own domains”
  19. Building an email platform on Workers + D1 + R2 + Queues — would like architecture feedback — Reddit, Jun 18, 2026“I’m building Lumimail, an AGPL-3.0 self-hosted email platform that runs inside a user’s own Cloudflare account.”
  20. Resend pricing — Resend, Jul 26, 2026“Choose a plan that works for you.”