Cloudflare Email Routing for receiving/sending emails via Workers. Use for email workers, forwarding, allowlists, or encountering Email Trigger errors, worker call failures, SPF issues.
View on GitHubsecondsky/claude-skills
cloudflare-email-routing
plugins/cloudflare-email-routing/skills/cloudflare-email-routing/SKILL.md
January 24, 2026
Select agents to install to:
npx add-skill https://github.com/secondsky/claude-skills/blob/main/plugins/cloudflare-email-routing/skills/cloudflare-email-routing/SKILL.md -a claude-code --skill cloudflare-email-routingInstallation paths:
.claude/skills/cloudflare-email-routing/# Cloudflare Email Routing
**Status**: Production Ready ✅ | **Last Verified**: 2025-11-18
---
## What Is Email Routing?
Two capabilities:
1. **Email Workers** - Receive and process incoming emails (allowlists, forwarding, parsing)
2. **Send Email** - Send emails from Workers to verified addresses
Both **free** and work together for complete email functionality.
---
## Quick Start (10 Minutes)
### Part 1: Enable Email Routing
**Dashboard setup:**
1. Dashboard → Domain → **Email** → **Email Routing**
2. **Enable Email Routing** → **Add records and enable**
3. Create destination address:
- Custom: `hello@yourdomain.com`
- Destination: Your email
- Verify via email
4. ✅ Basic forwarding active
### Part 2: Receiving Emails (Email Workers)
**Install dependencies:**
```bash
bun add postal-mime@2.5.0 mimetext@3.0.27
```
**Create email worker:**
```typescript
// src/email.ts
import { EmailMessage } from 'cloudflare:email';
import PostalMime from 'postal-mime';
export default {
async email(message, env, ctx) {
const parser = new PostalMime.default();
const email = await parser.parse(await new Response(message.raw).arrayBuffer());
console.log('From:', message.from);
console.log('Subject:', email.subject);
// Forward to destination
await message.forward('you@gmail.com');
}
};
```
**Configure wrangler.jsonc:**
```jsonc
{
"name": "email-worker",
"main": "src/email.ts",
"compatibility_date": "2025-10-11",
"node_compat": true // Required!
}
```
**Deploy and connect:**
```bash
bunx wrangler deploy
```
Dashboard → Email Workers → **Create address** → Select worker
### Part 3: Sending Emails
**Add send email binding:**
```jsonc
{
"name": "my-worker",
"main": "src/index.ts",
"compatibility_date": "2025-10-11",
"send_email": [
{
"name": "SES",
"destination_address": "user@example.com"
}
]
}
```
**Send from worker:**
```typescript
import { EmailMessage } from 'cloudflare:email';
import