Skill 02 · Cloudflare Email Service
Subchapter 2.5
references/sending.mdMarkdown2 KBView on GitHub
Prefer the native binding for Workers. For an external application, or when the user explicitly requests HTTP integration, use the REST API guide.
Read the documentation for the selected task before implementing. Inspect the project’s installed Wrangler and Agents SDK versions, configuration, and existing conventions first. Run through the project’s package manager after changing bindings; use its generated types instead of handwritten email interfaces. See for matching types to the project’s compatibility date and flags. Do not upgrade dependencies just to match an example.
wrangler types| Task | Read |
|---|---|
| Configure the binding, send a message, or maintain existing MIME-based sending | Workers API (opens in a new tab) |
| Restrict sender or destination addresses | Configure send bindings (opens in a new tab) |
| Set multiple recipients, CC/BCC, or named addresses | Specify recipients (opens in a new tab) |
| Add files, inline images, or uploaded attachments | Email attachments (opens in a new tab) |
| Set custom headers or diagnose header validation | Email headers (opens in a new tab) |
| Check recipient, message-size, or sending quotas | Limits (opens in a new tab) |
| Choose local simulation or remote delivery | Local email sending (opens in a new tab) |
| Interpret send results and binding errors | Workers API response and error handling (opens in a new tab) |
| Send, receive, route, and securely reply from an Agent | Email agent walkthrough (opens in a new tab) |
When adapting REST code to a binding, verify address fields, attachment representation, response shape, and errors against the binding docs and generated types. Exercise the relevant success and failure paths using the project’s existing checks. Confirm whether the chosen local configuration simulates delivery or sends real mail before testing.