Transactional Email Service: Send Methods, Routing, Authentication, and Limits
How to send and route email with Workers, REST, and SMTP; set up SPF, DKIM, DMARC; and fix delivery and authentication issues.
This page summarizes Cloudflare Email Service documentation for developers who need to send transactional mail, forward or process inbound mail, and keep authentication records correct. You must use Cloudflare DNS for Email Service. Arbitrary-recipient sending requires a Workers Paid plan; routing works on Free and Paid. Sending to verified destination addresses in your account is free even when only Email Routing is configured.
Email Sending and Email Routing: what each part does
Section titled “Email Sending and Email Routing: what each part does”Email Sending delivers outbound transactional messages (confirmations, alerts, magic links). Email Routing receives mail on your domain and forwards it to a verified mailbox, runs a Worker, or drops it. They use separate DNS setups and separate dashboard settings; removing one does not remove the other (domain configuration).
| Capability | Typical use | Plan (per docs) |
|---|---|---|
| Email Sending | Order confirmations, password resets, alerts | Workers Paid for arbitrary recipients |
| Email Routing | Forward support@ to Gmail, Worker filters |
Free and Paid |
| Verified-destination sends | Tests and internal mail to addresses you verified | Free on all plans; no quota |
Send transactional email and route incoming email with Cloudflare Email Service. Arbitrary-recipient sending requires Workers Paid, while routing supports Workers Free and Paid.
— Cloudflare, Cloudflare Email Service
Email Service FAQ states the product is for transactional email only, not marketing campaigns.
How to send email: Workers binding, REST API, and SMTP
Section titled “How to send email: Workers binding, REST API, and SMTP”All three paths share the same delivery pipeline, limits, DKIM and ARC signing, and dashboard logs.
Workers send_email binding
Section titled “Workers send_email binding”Add a send_email binding in Wrangler, onboard the sender domain, then call env.EMAIL.send() (Email Sending Workers API). You can restrict senders and recipients with destination_address, allowed_destination_addresses, or allowed_sender_addresses. For local tests against real Email Service, set remote = true on the binding (send emails get started).
REST API
Section titled “REST API”POST to /accounts/{account_id}/email/sending/send with a Bearer API token (REST API). A successful response groups recipients into delivered, permanent_bounces, and queued; the Workers binding returns a single messageId instead.
Authenticated SMTP submission
Section titled “Authenticated SMTP submission”SMTP is aimed at apps that already use Nodemailer, PHPMailer, smtplib, or similar (SMTP):
| Setting | Value |
|---|---|
| Host | smtp.mx.cloudflare.net |
| Port | 465 (implicit TLS only) |
| Username | api_token (literal string) |
| Password | API token with Email Sending: Edit |
| AUTH | PLAIN or LOGIN |
You can now send emails through Cloudflare Email Service using authenticated SMTP submission on smtp.mx.cloudflare.net:465. SMTP joins the REST API and the Workers binding as a third way to send transactional email — useful for existing applications that already speak SMTP and language-native SMTP libraries (Nodemailer, smtplib, PHPMailer, JavaMail).
— Cloudflare, Authenticated SMTP submission
Port 587 STARTTLS and unauthenticated relay on port 25 are not supported for outbound submission. Outbound SMTP from end-user networks is often blocked on port 25; use 465 or 587 toward your provider instead (SMTP port 25 blocked).
Domain onboarding: DNS for send versus route
Section titled “Domain onboarding: DNS for send versus route”Onboarding can add records automatically (domain configuration).
Email Sending records (cf-bounce subdomain)
Section titled “Email Sending records (cf-bounce subdomain)”Sending places bounce handling and authentication on cf-bounce.yourdomain.com: MX to Cloudflare, SPF v=spf1 include:_spf.mx.cloudflare.net ~all, DKIM at cf-bounce._domainkey, and often DMARC on _dmarc. These sending records stay managed for the life of the sending setup.
Email Routing records (apex domain)
Section titled “Email Routing records (apex domain)”Routing adds apex MX to *.mx.cloudflare.net, apex SPF with the same include:_spf.mx.cloudflare.net, and routing DKIM at selector cf2024-1._domainkey — separate from sending DKIM. Only one SPF TXT per name is allowed; merge existing SPF with include:_spf.mx.cloudflare.net and watch the 10 DNS lookup limit (troubleshooting SPF).
Email Routing MX cannot coexist with another provider’s apex MX on the same domain (for example Google Workspace). A zone supports up to 30 combined routing and sending domains (subdomains, limits).
SPF, DKIM, and DMARC: authentication and forwarding rules
Section titled “SPF, DKIM, and DMARC: authentication and forwarding rules”SPF lists authorized senders; DKIM signs message integrity; DMARC ties them together and sets failure policy (email authentication, DMARC Management).
Outbound Email Service mail is signed with SPF and DKIM. For forwards, Email Routing uses ARC and Sender Rewriting Scheme so downstream SPF can still pass.
Starting on July 3, 2025, we will require all emails to be authenticated using at least one of the protocols, SPF or DKIM, to forward them. We also strongly recommend that all senders implement the DMARC protocol.
— Cloudflare, Mail authentication requirements for Email Routing
Workers that forward upstream must handle forward failures when incoming mail lacks SPF or DKIM. Inbound routing may record Rejected for SPF, DKIM, or DMARC failures in the activity log. DMARC deployment often starts at p=none, then moves to quarantine or reject after reports look healthy (DMARC policies).
Email Routing: rules, destinations, and Workers
Section titled “Email Routing: rules, destinations, and Workers”A routing rule maps an address pattern to an action: Send to an email, Send to a Worker, or Drop (routing rules and addresses). Destination addresses are account-wide and must be verified before rules activate. Catch-all applies only at the apex; subdomains need separate enablement (subdomains).
In a Worker, the email() handler can forward(), reply() (with DMARC and threading limits), or setReject(). Replies send from your destination address, not your routing alias (postmaster limitations).
Lifecycle, logs, and common send errors
Section titled “Lifecycle, logs, and common send errors”Outbound flow: validate request → rate limits → authentication and suppression → SMTP delivery with soft-bounce retries (email lifecycle). Activity log statuses for sending include Sent, Delivered, Delivery failed, Rejected (suppression list), and Failed (config/auth).
| Code | Meaning | Typical fix |
|---|---|---|
E_SENDER_NOT_VERIFIED |
Domain not onboarded for sending | Email Sending settings |
E_RATE_LIMIT_EXCEEDED / E_DAILY_LIMIT_EXCEEDED |
Quota | Backoff; limits |
E_RECIPIENT_SUPPRESSED |
Suppression list | Manage suppressions |
E_TOO_MANY_RECIPIENTS |
More than 50 addresses | Split sends (limits) |
Delivered in the log means the recipient’s MTA accepted the message; inbox versus spam is decided afterward (troubleshooting). Hard bounces and complaints feed suppression and reputation (deliverability).
Common mistakes
Section titled “Common mistakes”- Two
v=spf1TXT records on one name (SPF permanently errors). - Using Email Routing while keeping Google or Microsoft apex MX without disabling routing.
- Proxying
mail.example.comA/AAAA records used for SMTP/IMAP. - Expecting marketing bulk mail on Email Service (not supported per FAQ).
- Ignoring July 2025 inbound authentication requirement for forwards.
How to check this on your site
Section titled “How to check this on your site”- In the Cloudflare dashboard, open Email Sending or Email Routing Settings and confirm MX, SPF, DKIM, and DMARC show healthy/Locked as documented.
- From your machine, run
digchecks from domain configuration troubleshooting (for exampledig TXT cf-bounce.yourdomain.comfor sending SPF,dig MX yourdomain.comfor routing). - Send a test message via your chosen path (Workers, REST, or SMTP) and confirm status Delivered in the activity log.
- For spoofing visibility, enable DMARC Management and review aggregate reports when they arrive.
- You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page does not match your setup or the official docs, email yimasynthetic@gmail.com with the page URL and the exact sentence you think is wrong so it can be corrected or clarified.