# Send email from a Cloudflare Worker

> Add a send_email binding and call env.EMAIL.send(). Who you can send to depends on your setup: verified addresses for free, anyone once a domain is onboarded.

Source: https://ayoh.dev/help/cloudflare-worker-send-email (updated November 23, 2026). Part of the Ayoh user guide: https://ayoh.dev/llms.txt

## The short answer

Cloudflare's Email Sending, in public beta since April 16, 2026, sends mail straight from a Worker with `env.EMAIL.send()`, or from the REST API. It handles HTML, plain text, attachments and custom headers. [1] Here is the whole setup:

wrangler.toml:

```
[[send_email]]
name = "EMAIL"
```

A Worker that sends one message:

```
export default {
  async fetch(request, env) {
    const response = await env.EMAIL.send({
      from: "notifications@yourdomain.com",
      to: "user@example.com",
      subject: "Order confirmed",
      html: "<h1>Your order has been confirmed</h1>",
      text: "Your order has been confirmed.",
    });
    return Response.json({ messageId: response.messageId });
  },
};
```

Since May 28, 2026, `from`, `to`, `cc`, `bcc` and `replyTo` also take an object with `email` and `name`, so the message shows a display name. [5]

## Who you can send to

| Your setup | Who you can send to | Cost |
| --- | --- | --- |
| Email Routing only, no sending domain | Only destination addresses you have verified in your account. [3] | Free on any plan, and not counted toward a quota or daily limit. [3] |
| A sending domain onboarded | Any recipient, right away. [3] | Email Sending is a Workers Paid feature. [1] Mail to verified addresses stays free. [3] |

Mail can only go out from a domain you route through Cloudflare. [3] A send to an address the plan doesn't allow fails with `E_RECIPIENT_PLAN_RESTRICTED`. [4]

## Lock a binding down

For a Worker that should only ever alert you, limit what its binding may do. `destination_address` allows one fixed recipient, `allowed_destination_addresses` a list of them, and `allowed_sender_addresses` a list of From addresses. [2]

wrangler.toml: a binding that can only email you:

```
[[send_email]]
name = "NOTIFY_ME"
destination_address = "you@yourdomain.com"
```

## Limits worth knowing

- 50 recipients per email, across to, cc and bcc. [3]
- 25 MiB per message, attachments included, and 998 characters for the subject. [3]
- New accounts start with a small daily quota that grows with good sending. [3]
- Mail sent from a Worker shows as **dropped** in the Email Routing summary even when it was delivered. Use the Email Sending logs to see what went out. [3]
- `wrangler dev` only logs the email unless the binding has `remote = true`; with it, real mail goes to real people. [6]

## Sending as a person, not a script

A binding is right for alerts and receipts. To write and reply to people as your own address, with the mail kept in your account, Ayoh sets up Email Routing, Email Sending, SPF and DKIM in your Cloudflare account and gives you an inbox on top. See [Cloudflare Email Routing: send from your domain](https://ayoh.dev/help/cloudflare-email-routing) and [Getting started](https://ayoh.dev/help/getting-started).

## Sources

Read November 23, 2026.

- [1] Cloudflare changelog, [Email Sending now in public beta](https://developers.cloudflare.com/changelog/post/2026-04-16-email-sending-public-beta/), April 16, 2026: `env.EMAIL.send()`, the REST API, and the Workers paid plan.
- [2] Cloudflare, [Send bindings](https://developers.cloudflare.com/email-service/configuration/send-bindings/): `destination_address`, `allowed_destination_addresses` and `allowed_sender_addresses`.
- [3] Cloudflare, [Email Service limits](https://developers.cloudflare.com/email-service/platform/limits/), updated October 30, 2026: verified destinations, free sends, recipients, size, daily quotas, and the dropped status.
- [4] Cloudflare, [Email Sending Workers API](https://developers.cloudflare.com/email-service/api/send-emails/workers-api/), updated November 17, 2026: the binding and its error codes.
- [5] Cloudflare changelog, [Send emails with named recipient addresses](https://developers.cloudflare.com/changelog/post/2026-05-28-named-email-recipients/), May 28, 2026.
- [6] Cloudflare, [Test email sending locally](https://developers.cloudflare.com/email-service/observability/local-development/sending/): local simulation and remote bindings.
