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

Cloudflare Email Sending

Configure the Cloudflare Email Sending REST API adapter.

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

Cloudflare Email Sending uses Cloudflare’s REST endpoint, not a Worker binding. It is useful when your sending domain already lives in Cloudflare and you want API-based delivery with CC, BCC, reply-to, headers, and attachments.

Before live sends

Enable Cloudflare Email Sending for the account and DNS domain, create an API token with Email Sending permission, and verify whether the account is limited to approved recipients. The adapter can validate the message shape locally, but only Cloudflare can prove the domain and account are ready to deliver.

Configure

Use baseUrl only for tests or a Cloudflare-compatible proxy.

Send

Cloudflare recipient fields support plain email addresses. from and replyTo may include display names, but to, cc, and bcc must not. The adapter also limits total recipients to 50 and replyTo to one address.

Options

Option Type Required Notes
apiToken string Yes Cloudflare API token with Email Sending permission.
accountId string Yes Cloudflare account ID used in the Email Sending endpoint.
baseUrl string No Defaults to https://api.cloudflare.com/client/v4.
fetch typeof fetch No Useful for tests or custom runtimes.

Response

The adapter maps Cloudflare delivered and queued recipients to accepted, and permanent_bounces to rejected.

CLI smoke test

See field support for supported message fields.

Last updated on