OpenAICloudflare Developer PlatformApr 16, 2026, 12:00 AM

Email Service - Email Sending now in public beta

A condensed section focused on the key takeaways first.

Original Post

Quick Digest

Summary

A condensed section focused on the key takeaways first.

openaienmodel: gpt-5-mini-2025-08-07

Email Sending now in public beta

Key Points

  • Workers API: env.EMAIL.send()
  • Supports attachments and inline images
  • Integrates with Agents SDK and Wrangler

Summary

Email Sending is now in public beta. You can send transactional email directly from Workers using env.EMAIL.send() or via the REST API. Supported payloads include HTML and plain-text bodies, attachments, inline images, and custom headers. Email Sending joins Email Routing under the Cloudflare Email Service and integrates with the Agents SDK (native onEmail hook), the Email MCP server, and Wrangler CLI commands. The feature is available on the Workers paid plan—see the Email Service documentation to get started.

Key Points

  • Send from Workers: call env.EMAIL.send({ from, to, subject, html, text, attachments, headers }) inside a Worker.
  • REST API: use the REST endpoint to send email from non-Worker environments.
  • Payload features: HTML, plain text, attachments, inline images, and custom headers are supported.
  • Integrations: Agents SDK (onEmail), Email MCP server, and Wrangler CLI allow receiving, processing, and sending email from agents and CLIs.
  • Availability: public beta; requires the Workers paid plan. Follow the Email Service docs for setup, domain verification, and examples.

Full Translation

Translations

A translation section that keeps the flow of the original article.

openaijamodel: gpt-5-mini-2025-08-07

Email Service — Email Sending がパブリックベータで利用可能に

Email Sending がパブリックベータで利用可能に

Email Sending はパブリックベータになりました。Workers(env.EMAIL.send())または REST API から直接トランザクショナルメールを送信でき、HTML、プレーンテキスト、添付ファイル、インライン画像、カスタムヘッダをサポートします。Email Sending は Email Routing ↗ とともに新しい Cloudflare Email Service の一部となり、Cloudflare の開発者プラットフォーム上でメールの送受信を一元化します。

主な機能

  • Workers(env.EMAIL.send())または REST API からの直接送信
  • HTML、プレーンテキスト、添付ファイル、インライン画像、カスタムヘッダのサポート
  • Email Routing ↗ と統合された Cloudflare Email Service の一部
  • Agents SDK と統合され、エージェントはネイティブな onEmail フックでメールを受信、処理、返信可能
  • 新しい Email MCP server ↗ と Wrangler CLI の email コマンドにより、エージェントは実行場所に依らずメールを送信可能

コード例

JavaScript (src/index.js)

// 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 });
  },
};

TypeScript (src/index.ts)

// src/index.ts
export default {
  async fetch(request, env): Promise<Response> {
    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 });
  },
} satisfies ExportedHandler<Env>;

連携と利用開始

Email Service は Agents SDK と統合され、エージェントは onEmail フックでメールを受信・処理・返信できます。これを新しい Email MCP server ↗ や Wrangler CLI の email コマンドと組み合わせることで、エージェントは実行場所に関係なくメールの送受信が可能です。

今日から Workers とエージェントでメールの送受信を開始できます。Email Sending は Workers の有料プランで利用可能です。開始方法や詳細は Email Service ドキュメントを参照してください。