Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Implements and troubleshoots Cloudflare Email Sending and Email Routing integrations, including Workers bindings and delivery configuration.
68% 100%+32 ptsof test cases passed
Passed 22 of 22 test cases with the skill, and 15 of 22 without it.
This test ran on v2. v3 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
Not used yet
Handle incoming emails sent to your domain via a Worker's email() handler. Forward, reply, reject, or parse emails programmatically.
For full API details, see the Email Routing docs.
Export an email() function from your Worker. No special wrangler binding needed — a routing rule connects incoming addresses to your Worker.
export default {
async email(message, env, ctx): Promise<void> {
console.log(`Email from ${message.from} to ${message.to}`);
await message.forward("[email protected]");
},
} satisfies ExportedHandler<Env>;
Set up routing rules in Dashboard > Compute & AI > Email Service > Email Routing > Routing Rules, or via wrangler email routing rules create.
The message parameter is a ForwardableEmailMessage. Run npx wrangler types to get the full type definition. Key properties and methods:
message.from / message.to — envelope addresses (SMTP MAIL FROM / RCPT TO). message.from is trustworthy; header addresses can be spoofed.message.headers — Headers object (use .get("subject"), .get("message-id"), etc.)message.raw — ReadableStream<Uint8Array> of raw MIME content. Single use — buffer before accessing.message.rawSize — size in bytesmessage.setReject(reason) — reject with a permanent SMTP errormessage.forward(rcptTo, headers?) — forward to a verified destinationmessage.reply(emailMessage) — reply with an EmailMessage objectawait message.forward("[email protected]");
Published skills whose descriptions closely match this one, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.