[ Web Proxy ]
URL:
Viewing: https://www.cloudflare.com/products/email-service/ [Back]  [Original]

Email Service

Email Service

Email for applications, workflows, and agents

Cloudflare Email Service gives your applications and agents a native way to send transactional email, receive inbound messages, and automate workflows on a global network.

Built for Agents

Give agents a real inbox and the ability to send, receive and reply without stitching together third-party tools.

Programmable by default

Route inbound email to Workers, process with AI, store attachments, and trigger workflows with code

One platform, bidirectional email

Combine email routing and email sending to handle the full email lifecycle on one platform.

Build without boundaries

Join thousands of developers who've eliminated infrastructure complexity and deployed globally with Cloudflare. Start building for free no credit card required.

Background Pattern [Background Pattern]
send.ts receive.ts built.ts
export default {  async fetch(request, env) {    await env.SEND_EMAIL.send({      to: [{ email: 'user@example.com' }],      from: { email: 'notifications@your-domain.com', name: 'Your App' },      subject: 'Your order has shipped',      text: 'Your order #1234 has shipped and is on its way.',    });
    return new Response('Email sent');  },};
export default {  async email(message, env, ctx) {    const raw = await new Response(message.raw).text();
    await env.EMAIL_QUEUE.send({      from: message.from,      to: message.to,      raw,    });  },};
import { Agent, routeAgentEmail } from 'agents';import { createAddressBasedEmailResolver, type AgentEmail } from 'agents/email';import PostalMime from 'postal-mime';
export class SupportAgent extends Agent {  async onEmail(email: AgentEmail) {    const raw = await email.getRaw();    const parsed = await PostalMime.parse(raw);
    const emails = this.state.emails || [];    emails.push({      from: email.from,      subject: parsed.subject,      body: parsed.text,      receivedAt: new Date().toISOString(),    });
    this.setState({ ...this.state, emails });
    await this.replyToEmail(email, {      fromName: 'Support Agent',      body: `We received your message about "${parsed.subject}".`,    });  }}
export default {  async email(message, env) {    await routeAgentEmail(message, env, {      resolver: createAddressBasedEmailResolver('SupportAgent'),    });  },};

Send transactional emails

Send from your appDeliver transactional and workflow email directly from Workers with a native binding.

Receive inbound email

Route inbound email into Workers for parsing, automation, and downstream processing.

Build an email-native agent

Use the Agents SDK to maintain state across conversations and reply from the same platform.

A few lines of code. Global email delivery.

Use Email Sending for outbound delivery and Email Routing for inbound handling, all from the same Workers application.

Background Pattern [Background Pattern]
Email Service

Email for agents

You can use Email Service to:

View docs

Send from Workers

Trigger transactional and workflow email directly from application logic.

Route inbound email

Receive mail on your domain and hand it to Workers for processing.

Enrich and orchestrate

Classify content with AI, store attachments, and fan out async work with Queues.

Reply or escalate

Respond automatically, update state, or hand off to downstream systems and humans.

Powerful primitives, seamlessly integrated

Built on systems powering 20% of the Internet, Email Service runs on the same infrastructure Cloudflare uses to build Cloudflare. Enterprise-grade reliability, security, and performance are standard.

Web Proxy Viewer  |  New URL  |  Original Page