Infrastructurecloudflare
cloudflare-email-service
Send and receive transactional emails with Cloudflare Email Service (Email Sending + Email Routing). Use when building email sending (Workers binding or REST API), email routing, Agents SDK email handling, or integrating email into any app — Workers, Node.js, Python, Go, etc. Also use for email deliverability, SPF/DKIM/DMARC, wrangler email setup, MCP email tools, or when a coding agent needs to send emails. Even for simple requests like "add email to my Worker" — this skill has critical config details.
500 est. installs0 stars
Estimated installs are a discovery signal based on public repository popularity and source completeness, not recorded Dokki installation events.
Repository
cloudflare/skills
Pinned commit
f96bff754e42
License
Apache-2.0
Execution
Instructions only
Complete source instructions
SKILL.md
Cloudflare Email Service
Your knowledge of the Cloudflare Email Service, Email Routing or Email Sending may be outdated. Prefer retrieval over pre-training for any Cloudflare Email Service task.
Cloudflare Email Service lets you send transactional emails and route incoming emails, all within the Cloudflare platform. Your knowledge of this product may be outdated — it launched in 2025 and is evolving rapidly. Prefer retrieval over pre-training for any Email Service task.
If there is any discrepancy between this skill and the sources below, always trust the original source. The Cloudflare docs, REST API spec, @cloudflare/workers-types, and Agents SDK repo are the source of truth. This skill is a convenience guide — it may lag behind the latest changes. When in doubt, retrieve from the sources below and use what they say.
Retrieval Sources
FIRST: Check Prerequisites
Before writing any email code, verify the basics are in place:
- Domain onboarded? Run
npx wrangler email sending listto see which domains have email sending enabled. If the domain isn't listed, runnpx wrangler email sending enable userdomain.comor see cli-and-mcp.md [blocked] for full setup instructions. - Binding configured? Look for
send_emailinwrangler.jsonc(for Workers) - postal-mime installed? Run
npm ls postal-mime(only needed for receiving/parsing emails)
What Do You Need?
Start here. Find your situation, then follow the link for full details.
Quick Start — Workers Binding
Add the binding to wrangler.jsonc, then call env.EMAIL.send(). The from domain must be onboarded via npx wrangler email sending enable yourdomain.com.
The binding is recommended for Workers — no API keys needed. If a user specifically requests the REST API from within a Worker (e.g., they already have an API token workflow), that works too — see rest-api.md [blocked].
See sending.md [blocked] for the full API, batch sends, attachments, custom headers, restricted bindings, and Agents SDK integration.
Quick Start — REST API
For apps outside Workers, or within Workers if the user explicitly requests it. Key differences from the Workers binding:
- Endpoint:
POST https://api.cloudflare.com/client/v4/accounts/{account_id}/email/sending/send fromobject usesaddress(notemail):{ "address": "...", "name": "..." }replyToisreply_to(snake_case)- Response returns
{ delivered: [], permanent_bounces: [], queued: [] }(notmessageId)
See rest-api.md [blocked] for curl examples, response format, and error handling.
Common Mistakes
References
Read the reference that matches your situation. You don't need all of them.
- references/sending.md [blocked] — Workers binding API, attachments, Agents SDK email. For Workers or Agents SDK.
- references/rest-api.md [blocked] — REST endpoint, curl examples, error handling. For apps NOT on Workers.
- references/routing.md [blocked] — Inbound
email()handler, forwarding, replying, parsing. For receiving emails. - references/cli-and-mcp.md [blocked] — Domain setup, wrangler commands, MCP tools. For first-time setup.
- references/deliverability.md [blocked] — SPF/DKIM/DMARC, bounces, suppressions, best practices.
Same repository
Related Skills
agents-sdk
Build AI agents on Cloudflare Workers using the Agents SDK. Load when creating stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, chat applications, voice agents, or browser automation. Covers Agent class, state management, callable RPC, Workflows, durable execution, queues, retries, observability, and React hooks. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.
View detailscloudflare
Comprehensive Cloudflare platform skill covering Workers, Pages, storage (KV, D1, R2), AI (Workers AI, Vectorize, Agents SDK), feature flags (Flagship), networking (Tunnel, Spectrum), security (WAF, DDoS), and infrastructure-as-code (Terraform, Pulumi). Use for any Cloudflare development task. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.
View detailscloudflare-one
Guides Cloudflare One Zero Trust and SASE work across Access, Gateway, WARP, Tunnel, Cloudflare WAN, DLP, CASB, device posture, and identity. Use when designing, configuring, troubleshooting, or reviewing Cloudflare One deployments. Retrieval-first: use current Cloudflare docs/API schemas instead of embedded product docs.
View detailscloudflare-one-migrations
Plans migrations from Zscaler ZIA/ZPA, Palo Alto, legacy VPN, SWG, or SASE stacks to Cloudflare One. Use for migration assessments, policy mapping, rollout plans, and parity/gap analysis.
View detailsdurable-objects
Create and review Cloudflare Durable Objects. Use when building stateful coordination (chat rooms, multiplayer games, booking systems), implementing RPC methods, SQLite storage, alarms, WebSockets, or reviewing DO code for best practices. Covers Workers integration, wrangler config, and testing with Vitest. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.
View detailssandbox-migrate-to-next
Use when porting a Cloudflare Sandbox app from stable @cloudflare/sandbox to @cloudflare/sandbox@next (Sandbox SDK 1.0 preview), or when the user asks to migrate or upgrade to Sandbox 1.0 / @next. Not for day-to-day stable work (sandbox-stable) or new @next apps (sandbox-next).
View details