openaienmodel: gpt-5-mini-2025-08-07
Email Service - Send emails with named recipient addresses
Key Points
- Recipients can include display names
- Objects accepted for to/cc/bcc/replyTo/from
- Strings still supported for compatibility
Summary
You can now include display names for recipient addresses when sending email via Cloudflare's Email Service. The API accepts an object with email and an optional name for to, cc, bcc, replyTo, and from. Plain-string addresses remain supported and arrays can mix strings and named objects.
Key Points
- Pass objects of the form { email, name? } for to, cc, bcc, replyTo, and from.
- Arrays may mix plain string addresses and named objects for gradual migration and backward compatibility.
- JavaScript/TypeScript examples use env.EMAIL.send and return response.messageId.
Example
A minimal JavaScript example (indented code block):
const response = await env.EMAIL.send({
from: { email: "support@example.com", name: "Support Team" },
to: { email: "jane@example.com", name: "Jane Doe" },
cc: [ "manager@company.com", { email: "team@company.com", name: "Engineering Team" } ],
subject: "Welcome!",
html: "<h1>Thanks for joining!</h1>",
text: "Thanks for joining!",
});
// response.messageId
Notes
- Refer to the Workers API and REST API docs for full request examples and advanced options.
- No breaking changes: existing string-only usage continues to work.