UStackUStack
Cloudflare Email Service icon

Cloudflare Email Service

Cloudflare Email Service enters public beta to help developers build email-native agents and apps that can send, receive, and process email on Cloudflare.

Cloudflare Email Service

What is Cloudflare Email Service?

Cloudflare Email Service is an infrastructure layer for building email-native agents and applications. It lets agents send, receive, and process email using Cloudflare developer platform components, so you can use the inbox as an interface rather than creating separate channels or custom integrations.

The service is designed to work alongside Cloudflare Agents SDK and onEmail-style agent hooks. With Email Routing for inbound messages and Email Sending for outbound replies/notifications, developers can implement bidirectional email workflows inside the same Cloudflare environment.

Key Features

  • Email Routing (inbound email to your app/agent): Receive email and route it to your application or agent for processing, enabling an inbox-based interaction model.
  • Email Sending (outbound transactional email): Send replies or notifications from your agent/application to users by delivering messages that can be triggered as part of asynchronous work.
  • Workers binding for Email Sending (public beta): Send emails directly from Workers using a native env.EMAIL.send(...) binding—no API keys or secrets management.
  • REST API + SDKs for Email Sending: Send emails from any platform or language via the Cloudflare REST API, with TypeScript, Python, and Go SDK support.
  • Automatic domain authentication configuration (SPF/DKIM/DMARC): When you add your domain to Email Service, Cloudflare configures SPF, DKIM, and DMARC so messages are authenticated and delivered rather than left to manual setup.
  • Global delivery on Cloudflare network: Email Service is a global service built on Cloudflare’s network for low-latency delivery worldwide.
  • Complete bidirectional workflows with Email Routing + Email Sending: Receive an email, process it in a Worker, and reply without leaving Cloudflare.

How to Use Cloudflare Email Service

  1. Start with Email Routing for inbound messages: Set up your agent to receive email via the Agents SDK onEmail hook (first-class for inbound email).
  2. Use Email Sending to reply asynchronously: During public beta, add Email Sending to enable your agent to send outbound email replies or notifications after it has processed work.
  3. Send from Workers using the native binding: In your Worker, call env.EMAIL.send with to, from, subject, and email body content (using text).
  4. Alternatively, send via the REST API and SDKs: Use the Cloudflare Email Service send endpoint for server-side or cross-platform email sending, with language SDKs available (TypeScript, Python, Go).
  5. Add and authenticate your sending domain: Configure your domain in Email Service so Cloudflare can set up SPF, DKIM, and DMARC automatically.

Use Cases

  • Customer support agent inbox workflow: Use Email Routing to receive customer messages, persist ticket data while processing the email in an agent/Worker, and send an asynchronous reply after background tasks complete.
  • Invoice processing and user notifications: Build an invoice pipeline that receives inbound email (e.g., documents or requests) and later sends status or “done” notifications to users when the work finishes.
  • Account verification flows: Implement verification interactions where email is the primary user-facing channel, including sending out verification-related messages from agent logic.
  • Multi-agent workflows that escalate and follow up: Coordinate work across systems, schedule follow-up emails, and escalate edge cases via outbound email once conditions are detected.
  • Multi-channel agent expansion without new client UIs: When users already check email, expose the agent through the inbox instead of building a custom chat interface per channel.

FAQ

  • Is Email Service only for Agents? No. The source describes Email Service as part of a developer platform layer that enables applications and agents to send emails during the public beta.

  • How do I receive emails from users? The source points to Email Routing for receiving email to your application or agent, which works with agent processing on Cloudflare.

  • Can agents send emails after long-running or asynchronous work? Yes. The source contrasts chatbot-style synchronous replies with agent behavior that can process work over time and then respond asynchronously using Email Sending.

  • Do I need to manage SPF, DKIM, and DMARC records manually? The source says that when you add your domain to Email Service, Cloudflare configures SPF, DKIM, and DMARC automatically.

  • How can I send emails from a Worker? Use the native Workers binding described in the source: env.EMAIL.send({ to, from, subject, text }).

Alternatives

  • Build a custom email integration using an external mail provider: If you prefer to manage sending yourself, you can use third-party email APIs and handle inbound via your own routing, but you’ll need to build more of the end-to-end workflow outside Cloudflare’s routing/sending layer.
  • Use a dedicated email parsing/routing service with a separate agent backend: Instead of Cloudflare’s integrated Email Routing + Email Sending, you can route inbound email through another provider and have your backend generate outbound emails.
  • Use chat or ticketing interfaces instead of email-native workflows: For teams focused on real-time interaction, a chat/ticketing system can replace email as the primary interface, but you lose the inbox-based experience described in the source.
  • Implement outbound transactional email only (no inbound routing): If you only need notifications, you can use an outbound email API without building the bidirectional receive-and-reply workflow.