Email Workers
Use an Email Worker's email() handler for custom processing of incoming mail. Use routing rules for simple address-based forwarding. Fetch current documentation before implementing the handler or its dependencies.
| Operation | Documentation |
|---|---|
| Forward to a verified destination, reject, or reply within the incoming event | Email handler API |
| Send a new message or a later response | Sending Workers API |
| Parse and store mail for later processing | Email storage and processing |
message.raw is a single-use stream. If parsing and archiving both need the raw content, plan how to reuse it rather than reading the stream twice. Forwarding destinations must be verified; reply requirements are documented separately from outbound sending.
Reference map
- Configuration: routing, bindings, local development, and types.
- API: message actions, MIME, and sending.
- Patterns: filtering, storage, attachments, and background processing.
- Troubleshooting: stream handling, authentication, limits, and errors.