How to Send Email from Cloudflare Workers
There are two real ways to do this: Cloudflare's own native Email Service binding, or calling an external email API like Notify over fetch() . I'll walk through both, but I want to flag something about the native option up front that's easy to miss until you're actually setting it up: it currently requires the Workers Paid plan, not just a Cloudflare account. If you're on the free Workers tier…
Cloudflare Workers offer two methods to send emails: using its built-in Email Service binding or calling an external email API with the fetch() method. The native Email Service binding, however, requires the Workers Paid plan and has limitations on sending to arbitrary recipients and before fully onboarding a domain. In contrast, calling an external API like Notify over fetch() is a more portable approach that works well with Workers since it avoids any Node.js specific issues.
This method requires storing the API key as a secret and calling the API from the Worker with a POST request containing the necessary email details. The native Email Service binding involves registering a domain, adding DNS records, and binding it to your Wrangler config. Once configured, it can be used in a Worker's fetch() function to send emails.
For handling bounced emails, a webhook can be registered with Notify to receive real-time notifications. It's important to note that Cloudflare's Email Service also handles inbound email routing, while Notify only handles outbound sending. Testing should be done using wrangler dev, which logs messages locally for inspection, rather than sending actual emails.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.