cloudflare-email-routing
This skill guides you through Cloudflare Email Routing for both receiving emails via Workers and sending from verified addresses. Learn to parse incoming messages, implement allowlists and blocklists, route based on content, and handle attachments—all free and production-tested.
Cloudflare Email Routing lets you receive and send emails from Workers with built-in forwarding and parsing.
AI-generated summary based on this skill's SKILL.md
Install
secondsky/claude-skills/cloudflare-email-routing · repository language: TypeScript
git clone https://github.com/secondsky/claude-skills
cp -r claude-skills/plugins/cloudflare-email-routing/skills/cloudflare-email-routing ~/.claude/skills/cloudflare-email-routingFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I send emails from Cloudflare Workers?
cloudflare-email-routing enables sending emails from Workers using the Email Binding. First, verify the recipient address in your Cloudflare dashboard under Email Routing settings. Then configure your wrangler.toml with the email binding, and use the PostalMIME library to format messages. Call the binding's send() method with properly formatted MIME content to deliver emails to verified addresses.
What is cloudflare-email-routing and how does it work?
cloudflare-email-routing is an MIT-licensed skill that guides you through Cloudflare's Email Routing service for receiving emails via Workers and sending from verified addresses. It covers parsing incoming messages, implementing allowlists and blocklists, routing based on content, handling attachments, and building email automation patterns—all using Cloudflare's free Email Routing service.
How do I receive and parse emails with Cloudflare Workers?
cloudflare-email-routing teaches you to set up Email Workers that trigger when emails arrive at your domain. Use the PostalMIME library to parse incoming email content, extract attachments, and read headers. Workers receive the raw email message, which you can filter, validate, and forward based on custom logic like allowlists, blocklists, or content patterns.
What DNS records do I need for Cloudflare Email Routing?
cloudflare-email-routing requires proper DNS configuration including MX records pointing to Cloudflare's mail servers, SPF records to authorize sending, and DKIM records for authentication. Cloudflare typically manages these automatically when you enable Email Routing, but verify they're correctly set in your DNS settings to avoid delivery failures and ensure emails route properly.
How can I build allowlists and blocklists with Email Workers?
cloudflare-email-routing supports building email automation patterns by parsing sender addresses and content in your Worker. Store allowlists and blocklists in Durable Objects or KV storage, then check incoming email senders against these lists. Route matching emails forward to destinations, reject blocked senders, or trigger auto-replies based on your custom rules.
Why is my email worker destination address not verified?
cloudflare-email-routing requires all recipient addresses to be verified before sending. In your Cloudflare dashboard's Email Routing settings, add each destination address and confirm the verification email sent to that address. Until verified, the Email Binding will reject send attempts to unverified addresses with an error.
SKILL.md
rendered from the published skill — quoted content, verbatim
Cloudflare Email Routing
Status: Production Ready ✅ | Last Verified: 2025-11-18
What Is Email Routing?
Two capabilities:
1.
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 12 files
plugins/cloudflare-email-routing/skills/cloudflare-email-routing/SKILL.md
plugins/cloudflare-email-routing/skills/cloudflare-email-routing/references/common-errors.md
plugins/cloudflare-email-routing/skills/cloudflare-email-routing/references/dns-setup.md
plugins/cloudflare-email-routing/skills/cloudflare-email-routing/references/local-development.md
plugins/cloudflare-email-routing/skills/cloudflare-email-routing/references/setup-guide.md
plugins/cloudflare-email-routing/skills/cloudflare-email-routing/templates/receive-allowlist.ts
plugins/cloudflare-email-routing/skills/cloudflare-email-routing/templates/receive-basic.ts
plugins/cloudflare-email-routing/skills/cloudflare-email-routing/templates/receive-blocklist.ts
plugins/cloudflare-email-routing/skills/cloudflare-email-routing/templates/receive-reply.ts
plugins/cloudflare-email-routing/skills/cloudflare-email-routing/templates/send-basic.ts
plugins/cloudflare-email-routing/skills/cloudflare-email-routing/templates/send-notification.ts
plugins/cloudflare-email-routing/skills/cloudflare-email-routing/templates/wrangler-email.jsonc