cloudflare-email-service

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Integrating transactional email into applications requires navigating domain onboarding, DNS authentication, binding configuration, and deliverability rules. This Skill provides up-to-date guidance for sending and receiving email through Cloudflare Email Service, preventing common configuration mistakes like missing bindings, unverified domains, and incorrect API field names. ## 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 platform: Use the REST API with Bearer token authentication from Node.js, Python, Go, or coding agents via wrangler CLI and MCP tools. - Receive and route inbound email: Handle incoming messages with the Workers email() handler, parse MIME content with postal-mime, forward, reply, or store emails in Durable Objects for human-in-the-loop workflows. - Use Case: Add order confirmation emails to a Cloudflare Worker by onboarding your domain with wrangler email sending enable, adding the binding, and sending via env.EMAIL.send() with both HTML and text bodies. ## Quick Start Ask the agent to add transactional email sending to your Cloudflare Worker using the send_email binding and an onboarded domain.

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 with a name like EMAIL, then call env.EMAIL.send() with to, from, subject, and html or text fields. The from domain must first be onboarded using wrangler email sending enable yourdomain.com.

How do I send emails with the Cloudflare Email REST API?▼

POST to https://api.cloudflare.com/client/v4/accounts/{account_id}/email/sending/send with a Bearer API token. Note the REST API uses address instead of email in the from object and reply_to instead of replyTo, unlike the Workers binding.

How do I receive and parse incoming emails in a Worker?▼

Export an email() handler from your Worker and set up an Email Routing rule pointing 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 E_SENDER_NOT_VERIFIED error means the from domain has not been onboarded to Email Sending. Run wrangler email sending enable yourdomain.com or onboard the domain in the Cloudflare Dashboard, which auto-configures SPF and DKIM records.

Can I use Cloudflare Email Service for marketing campaigns?▼

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

Why does reading message.raw twice return empty content?▼

The raw property is a single-use ReadableStream, so a second read returns nothing. Buffer it first with const raw = await new Response(message.raw).arrayBuffer() before parsing or forwarding.