cloudflare-email-service

Send and receive transactional emails using Cloudflare Email Service bindings, REST API, and Email Routing.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires postal-mime, mimetext, and includes references (resource) components.

What problem does it solve? Adding transactional email to an application involves confusing setup steps: domain onboarding, SPF/DKIM records, choosing between a Workers binding and a REST API, and avoiding subtle field-name differences that cause failed sends. This Skill guides you through sending and receiving email on Cloudflare with correct configuration from the start. ## Core Features & Use Cases - Send emails from Workers: Configure the send_email binding in wrangler.jsonc and call env.EMAIL.send() with attachments, custom headers, and up to 50 recipients. - Send from any external app: Use the REST API with Bearer token authentication from Node.js, Python, Go, or curl, with correct address/reply_to field naming. - Receive and route inbound email: Implement the Workers email() handler to forward, reply, reject, or parse messages with postal-mime, including Agents SDK integration. - Deliverability and monitoring: Manage suppression lists, check sending quotas, and query GraphQL analytics for delivery rates and bounce causes. - Use Case: You need your Cloudflare Worker to send a password-reset email. This Skill walks you through onboarding your domain, adding the binding, and sending with both HTML and text bodies to avoid spam folders. ## Quick Start Ask the agent to add email sending to your Cloudflare Worker using the send_email binding and onboard your domain with wrangler.

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 an email from a Cloudflare Worker?▼

Add a send_email binding to wrangler.jsonc with name EMAIL, onboard your domain with wrangler email sending enable, then call env.EMAIL.send() with to, from, subject, and html or text fields. No API keys are needed for the binding.

What is the difference between the Workers binding and the REST API for Cloudflare email?▼

The Workers binding uses email in the from object and replyTo in camelCase, returning a messageId. The REST API uses address and reply_to in snake_case, returns delivered/bounced/queued arrays, and requires a Bearer token.

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.

Why does my Cloudflare email send fail with sender not verified?▼

The from address must use a domain onboarded to Email Sending. Run wrangler email sending enable yourdomain.com or onboard in the Dashboard, which auto-adds the required SPF and DKIM records before your first send.

Can I use Cloudflare Email Service for marketing newsletters?▼

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 is message.raw empty when I read it twice in the email handler?▼

The raw stream is single-use, so a second read returns empty. Buffer it first with const raw = await new Response(message.raw).arrayBuffer(), then parse or forward from the buffered copy.