Skip to content

Changelog

New updates and improvements at Cloudflare.

hero image

Email Sending now in public beta

Email Sending is now in public beta. Send transactional emails directly from Workers (env.EMAIL.send()) or the REST API, with support for HTML, plain text, attachments, inline images, and custom headers. Email Sending joins Email Routing under the new Cloudflare Email Service — a single service for sending and receiving email on the Cloudflare developer platform.

Send an email from a Worker in a few lines of code:

src/index.js
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 });
},
};

Email Service also integrates with the Agents SDK, giving your agents a native onEmail hook to receive, process, and reply to emails. Combined with the new Email MCP server and Wrangler CLI email commands, any agent can send email regardless of where it runs.

Start sending and receiving emails from Workers and agents today. Email Sending is available on the Workers paid plan. Refer to the Email Service documentation to get started.