Features · Cloudflare Workers

How do I send email from a Cloudflare Worker?

Use Cloudflare Email Sending: on Workers Paid ($5 a month, 3,000 emails included, then $0.35 per 1,000) a Worker sends through a send_email binding. The binding sends one message and nothing else. sendmcp is an open source Worker on your own account that adds an HTTP API with keys, templates, webhooks, logs and suppression, and accepts Resend SDK calls.

Updated · Open source, runs on your Cloudflare account

Agent
My Worker needs to send password resets from acme.com. Set it up.

Done. acme.com is verified, and your Worker has a SENDMCP_KEY secret. The reset email is a template, so the Worker passes only the link.

What I set up
Domain acme.comSPF, DKIM, DMARC written and verified
pass
Template password-resetHTML and plain text, {{link}} variable
saved
Secret SENDMCP_KEYscoped to acme.com, send only
set
Test senddelivered to your inbox in 1.6 s
sent
Show the Worker codeAdd a webhook for bounces

The binding or sendmcp

Email Sending bindingsendmcp
Who can sendOnly Workers with the bindingAny Worker, server or app over HTTP
CodeCloudflare's own APIResend SDK, or plain fetch
KeysNone, the binding is the permissionOne key per project, scoped to a domain
TemplatesBuild the HTML yourselfStored templates with variables
BouncesEvent types to handle yourselfSuppression list, webhooks, bounce_explain
LogsWorkers logsEvery email in your D1, searchable by your agent
PriceWorkers PaidWorkers Paid; sendmcp is free

If one Worker sends one kind of email, the binding is enough. sendmcp is for several projects, or for code that already uses Resend.

Send with the binding

# wrangler.toml [[send_email]] name = "EMAIL" // worker.ts await env.EMAIL.send({ from: "hi@acme.com", to: user.email, subject: "Reset your password", html: `<a href="${link}">Reset</a>`, })

Send through sendmcp

// any Worker or Node app, with the Resend SDK import { Resend } from "resend" const resend = new Resend(env.SENDMCP_KEY) // RESEND_BASE_URL=https://mail.acme.com await resend.emails.send({ from: "hi@acme.com", to: user.email, template: "password-reset", data: { link }, })

Limits to know

Numbers from the Cloudflare Email Service docs, checked Nov 23, 2026.

Questions about this

Do I need Workers Paid to send email?

Yes. Email Sending to any address needs Workers Paid at $5 a month, which includes 3,000 emails. On the free plan, Workers can only send to verified addresses through Email Routing.

Can I send email from a Worker with SMTP?

Workers cannot open raw SMTP connections to most mail servers. Cloudflare added SMTP to Email Sending in June 2026 for apps outside Workers; inside a Worker, use the binding or the sendmcp HTTP API.

Can I use the Resend SDK inside a Worker?

Yes. The Resend SDK runs in Workers. Point it at your sendmcp URL and it sends through your own Cloudflare account.

How do I handle bounces from a Worker?

sendmcp records each bounce, adds hard bounces to suppression and calls your webhook. Your agent can explain any bounce with bounce_explain.

Send from every project for $0.

Open source. One click puts it on your Cloudflare account.