cloudflare-email-service

Implement and troubleshoot Cloudflare Email Sending and Email Routing integrations.

Updated Sep 1, 2026
One-click install
npx skills add https://github.com/jpmoya/claude-agents --skill cloudflare-email-service-jpmoya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloudflare-email-service
Source: https://github.com/jpmoya/claude-agents/tree/main/skills/cloudflare-email-service
Command: npx skills add https://github.com/jpmoya/claude-agents --skill cloudflare-email-service-jpmoya

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires postal-mime, mimetext, @cloudflare/workers-types, and includes references (resource) components.

What problem does it solve? Cloudflare Email Service launched in 2025 and evolves rapidly, so pre-trained knowledge of its APIs, bindings, and configuration is often outdated or wrong. This Skill routes every email task to current documentation and codifies the common mistakes (missing bindings, unverified domains, single-use raw streams) that break implementations. ## Core Features & Use Cases - Sending Emails: Send transactional email from Workers via the send_email binding, from external apps via the REST API, or from coding agents via wrangler CLI and MCP tools. - Receiving & Routing Emails: Build email() handlers that forward, reply, reject, or parse inbound mail with postal-mime, including store-and-reply-later patterns using Durable Objects. - Deliverability & Operations: Configure SPF/DKIM/DMARC, manage suppression lists, check sending quotas, and query zone-level GraphQL analytics for delivery monitoring. - Use Case: You need your Cloudflare Worker to send order confirmations and handle inbound support replies. The Skill walks you through domain onboarding, binding configuration, sending with proper threading headers, and monitoring bounce rates. ## Quick Start Ask the agent to set up Cloudflare Email Sending on your domain and send a test transactional email from a Worker.

Frequently Asked Questions about cloudflare-email-service

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I send emails from a Cloudflare Worker?

Add a send_email binding to wrangler.jsonc, then call env.EMAIL.send() with to, from, subject, and both html and text bodies. The from address must use a domain onboarded to Email Sending via wrangler email sending enable.

How do I receive and parse incoming emails with Email Routing?

Export an email() handler from your Worker and create a routing rule pointing addresses to it. Buffer message.raw once with new Response(message.raw).arrayBuffer(), then parse it with postal-mime to extract subject, text, and attachments.

Should I use the Workers binding or the REST API for sending email?

Use the Workers binding for code running inside Workers since it needs no API keys. Use the REST API with a Bearer token for external applications in Node.js, Go, or Python, or when an HTTP integration is explicitly required.

Why does reading message.raw twice return empty content?

message.raw is a single-use ReadableStream, so a second read returns nothing. Buffer it first with new Response(message.raw).arrayBuffer() and reuse the buffer for parsing, forwarding, or storage.

Can I use Cloudflare Email Service for marketing campaigns?

No, Email Service is restricted to transactional email triggered by user actions such as signups, password resets, and order confirmations. Marketing or bulk campaigns require a dedicated marketing email platform.

Why does forwarding an email to my address fail silently?

message.forward() only works with verified destination addresses. Verify the destination first with wrangler email routing addresses create or through the Dashboard before forwarding.