Skip to content
You're viewing documentation for v3.0.1. It may be out of date.Go to latest
Email SDK
Esc
↑↓navigate↵open⌘Jpreview
On this page

Cloudflare Email Sending

Send through Cloudflare's Email Sending REST API or Worker binding with plain-address recipients and a 50-recipient cap.

Capabilities

Repeated headers Idempotency Scheduling Personalized
No none No expanded

These values come from the adapter’s exported capabilities declaration. The field support matrix covers normalized message fields.

The Cloudflare adapter supports both Cloudflare Worker send_email bindings and Cloudflare’s Email Sending REST API. It is the natural pick when your sending domain lives in Cloudflare or when sending directly from a Cloudflare Worker. The trade-off is strict recipient rules: plain addresses only, 50 recipients max.

Cloudflare Email Sending logo
Cloudflare Email Sending@opencoredev/email-sdk/cloudflare
Provider docs

Configure

Worker binding (Cloudflare Workers)

In a Cloudflare Worker, bind Email Sending in your wrangler.json (or wrangler.toml) and pass the binding object (env.SEB) directly to the adapter.

REST API

Enable Email Sending for your account and domain, then create an API token with Email Sending permission. You also need your account ID.

PropType
binding?CloudflareSendEmailBinding

Cloudflare Worker SendEmail binding object (e.g. env.SEB). Mutually exclusive with REST API options.

TypeCloudflareSendEmailBinding
apiToken?string

Cloudflare API token with Email Sending permission. Required for REST API mode.

Typestring
accountId?string

Cloudflare account ID used in the send endpoint path. Required for REST API mode.

Typestring
baseUrl?string

Override the API origin, e.g. for a proxy. (REST API mode only)

Typestring
Default"https://api.cloudflare.com/client/v4"
fetch?typeof fetch

Custom fetch implementation for tests or special runtimes. (REST API mode only)

Typetypeof fetch

Send

Cloudflare maps cc, bcc, one replyTo, headers, and attachments. There are no tags or metadata.

Cloudflare REST API does not return a message id; instead result.accepted lists delivered and queued recipients and result.rejected lists permanent bounces. Worker bindings return the message ID if provided by the binding. Total recipients across to, cc, and bcc are capped at 50.

Verify from the CLI

Drop --dry-run for one real send; only Cloudflare can prove the domain and account are cleared to deliver.

Last updated on