Transactional Email Service: Sending, Suppressions, Workers Routing, and Activity Logs
How Cloudflare Email Service sends transactional mail, enforces suppressions, routes inbound mail to Workers, and exposes logs and queue events.
This page summarises Cloudflare documentation on Email Service: outbound Email Sending from Workers, the REST API, or SMTP; suppression lists that block undeliverable or complaining recipients; Email Routing and Email Workers for programmatic inbound mail; and Activity log observability plus Queues lifecycle events. Email Sending is offered on the Workers paid plan and sits alongside Email Routing under one Email Service product on the developer platform.
Email Sending: transactional mail from Workers and APIs
Section titled “Email Sending: transactional mail from Workers and APIs”Email Sending lets applications send transactional email with HTML, plain text, attachments, inline images, and custom headers. The typical Worker pattern calls env.EMAIL.send() and returns the assigned messageId:
Email Sending is now in public beta. Send transactional emails directly from Workers (
env.EMAIL.send()) or the REST API, with support for HTML, plain text, attachments, inline images, and custom headers. Email Sending joins Email Routing under the new Cloudflare Email Service — a single service for sending and receiving email on the Cloudflare developer platform.— Cloudflare, Email Sending now in public beta
Display names on addresses use an object with email and optional name for from, to, cc, bcc, and replyTo; plain strings still work and can be mixed in arrays (Send emails with named recipient addresses).
When a send fails validation or policy checks, the Workers binding documents specific error codes in Error codes. Examples that often appear in production include E_TOO_MANY_RECIPIENTS (more than 50 combined in to/cc/bcc), E_SENDER_NOT_VERIFIED, E_RECIPIENT_SUPPRESSED when Drop suppressed recipients is off, and rate or daily quota errors.
Suppression lists: why sends to some addresses are blocked
Section titled “Suppression lists: why sends to some addresses are blocked”Suppression lists record recipients Email Service must not contact. Cloudflare adds entries after eligible bounces and spam complaints; you can also add manual entries through the dashboard or API.
Suppression lists prevent Email Service from sending to recipients who should not receive mail. Cloudflare adds entries after eligible bounces and spam complaints. You can also add entries manually.
— Cloudflare, Suppression lists
Suppressions apply only to Email Sending, not to inbound Email Routing.
Suppression scope: account versus sending_domain
Section titled “Suppression scope: account versus sending_domain”Each suppression has a scope that defines which outbound sending domains it affects:
| Scope | Applies to |
|---|---|
account |
Every sending domain and subdomain in the account (default for new API entries if scope is omitted) |
sending_domain |
One sending domain only, such as mail.myappexample.com |
The sending domain of a message is the domain of the sender address (from for REST/Workers, envelope MAIL FROM for SMTP). Matching is exact: a suppression on myappexample.com does not block mail from mail.myappexample.com, and vice versa (Suppression scope).
Most importantly, Email Sending now automatically creates bounce and complaint suppressions at the sending-domain level. This provides greater granularity by preventing an issue with one sending domain from suppressing the recipient across your entire account.
— Cloudflare, Suppress recipients for one sending domain
Each address can hold one active account suppression and one sending_domain suppression per sending domain (Suppression list limits). Scope cannot be changed on an existing row; delete and recreate to move between scopes (Manage suppressions).
Automatic suppressions: bounces, complaints, and expiration
Section titled “Automatic suppressions: bounces, complaints, and expiration”| Reason | Created when | Typical expiration |
|---|---|---|
manual |
Dashboard or API | Time you choose, or none |
complaint |
Validated spam complaint | No expiration |
hard_bounce |
Permanent recipient-side rejection | No expiration if mailbox/domain missing or problem persists; otherwise 7 days |
soft_bounce |
Temporary recipient-side failure | 24 hours by default |
Hard bounces are never retried when the failure is permanent (unknown address, unknown domain, or permanent server rejection). Use read_only on API responses to see whether Cloudflare manages an entry; do not infer mutability from reason alone (Suppression rules).
Drop suppressed recipients: fail the send or strip blocked addresses
Section titled “Drop suppressed recipients: fail the send or strip blocked addresses”Every sending domain has Drop suppressed recipients. It is off by default.
| Sending method | Setting off | Setting on |
|---|---|---|
| REST API | 400 if any recipient is suppressed |
Removes suppressed addresses; sends to the rest |
Workers send() |
Throws E_RECIPIENT_SUPPRESSED |
Removes suppressed addresses; sends to the rest |
| SMTP | Rejects the whole message | Drops suppressed RCPTs; may return 250 2.0.0 Ok with no Message-ID if none remain |
Configure the toggle under sending-domain settings (Drop suppressed recipients). Suppressed recipients do not count toward quotas and show as Rejected in sending logs (Enforcement by sending method). SMTP documents the same behaviour and notes a message.rejected event with rejection.reason set to suppressed (Suppressed recipients).
To add a domain-scoped entry via API:
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/email/sending/suppressions \ --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ --header "Content-Type: application/json" \ --data '{ "email": "user@example.net", "scope": { "type": "sending_domain", "value": "mail.myappexample.com" } }'List one domain with scope_type=sending_domain&scope_value=… (Suppress recipients for one sending domain).
Queues event subscriptions: outbound lifecycle outside the dashboard
Section titled “Queues event subscriptions: outbound lifecycle outside the dashboard”For automation (suppression sync, app database cleanup, retries), subscribe to Email Sending events through Queues event subscriptions. Each subscription is tied to one sending domain (zone apex or verified sending subdomain).
Six event types are published: message.delivered, message.deferred, message.bounced, message.failed, message.rejected, and message.complained. Email Routing events are not published on this source.
Use them to track deliverability, react to bounces and complaints, and drive suppression or retry logic.
— Cloudflare, Subscribe to Email Sending events with Queues
Payloads include message details, delivery status, and SMTP response. The sync recipient records example removes KV records on message.complained and on message.bounced when payload.bounce.type is hard, complementing automatic suppressions.
Activity log and Email preview: delivery, auth, and message content
Section titled “Activity log and Email preview: delivery, auth, and message content”The Activity log lists sending and routing events with delivery and authentication details. In the dashboard you can filter from 30 minutes up to 30 days or set a custom range (Activity log).
The same per-event data is available in the GraphQL Analytics API via emailSendingAdaptive and emailRoutingAdaptive datasets.
For Email Routing, expand an event to inspect SPF, DKIM, and DMARC results. For sent mail, expand a row and open Preview when Email preview is enabled for the sending domain:
For sent emails, expand the email in the Activity log to open the Preview section and inspect the message as it was sent. The preview provides the following tabs: HTML, Text, Headers, Attachments, Raw.
— Cloudflare, Activity log
Previews cover messages sent while the setting is on and are kept for about seven days. New sending domains default to preview on; domains onboarded on or after 2026-07-02 get it automatically (Preview sent emails in the Activity log, Email preview).
Email Workers and Email Routing: inbound mail and replies
Section titled “Email Workers and Email Routing: inbound mail and replies”Email Workers run an email() handler on mail that hits routed addresses. Subaddressing (RFC 5233 plus addressing) lets user+detail@example.com match the user@example.com rule; the +detail segment is ignored for routing but remains visible in logs or Worker code (Subaddressing support in Email Routing).
Manage routing rules with Wrangler addresses
Section titled “Manage routing rules with Wrangler addresses”Instead of only using the dashboard, declare inbound addresses in Wrangler (requires Wrangler 4.113.0+). Each entry is a literal address or a catch-all *@example.com (apex only; list literals for routing subdomains) (Configure rules with Wrangler):
When you run
wrangler deploy, Wrangler creates rules for new addresses, updates existing rules managed by the Worker, and removes managed rules that are no longer in the configuration.— Cloudflare, Manage Email Routing rules with Wrangler
Omitting addresses leaves remote rules unchanged; an empty array removes all rules this Worker manages. Destructive reconciliations require confirmation; non-interactive deploys skip destructive changes and error after deploying the Worker.
Local development and threaded replies
Section titled “Local development and threaded replies”With npx wrangler dev, Wrangler exposes POST to /cdn-cgi/local/email so you can trigger the email() handler locally (Local development support for Email Workers).
Threaded replies from a Worker are allowed when the incoming message has valid DMARC, you reply at most once per EmailMessage event, the reply recipient equals the original sender, the outbound sender domain matches the domain that received the mail, and the References chain has at most 100 entries (Threaded replies now possible in Email Workers).
Common mistakes when sends fail or lists look wrong
Section titled “Common mistakes when sends fail or lists look wrong”- Assuming every bounce creates a suppression — sender authentication, reputation, or infrastructure failures may bounce without listing the recipient (Missing suppression after a bounce).
- Leaving Drop suppressed recipients off while broadcasting — one suppressed address in a large
tolist fails the entire REST or Worker send withE_RECIPIENT_SUPPRESSEDunless you enable drop mode or remove the address first. - Using account scope by default in the API — omitting
scopeblocks the recipient on all sending domains; usesending_domainwhen only one brand or subdomain mis-sent mail. - Expecting instant suppression removal — list updates and delivery enforcement can lag after expiry or deletion (Recipient blocked after expiration or deletion).
- Disabling Email preview then debugging HTML — without preview, the Activity log still shows metadata but not rendered bodies (Preview sent emails in the Activity log).
How to check this on your site
Section titled “How to check this on your site”- In the Cloudflare dashboard, open Email Sending (Compute → Email Service → Email Sending), send a test message, then review the Activity log for delivery status and authentication.
- If a send fails with suppression errors, query suppressions for the recipient (
?email=…on the account suppressions API) and comparereason,expires_at,scope, andread_only(Suppressed recipient). - Confirm Drop suppressed recipients and Email preview match your expectations under sending-domain Settings.
- For inbound Workers, run
wrangler deploy --dry-runto validateaddresses, then exercise/cdn-cgi/local/emailduring local development. - 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 is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact statement you are asking about so it can be corrected or explained.