© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developers•16mo ago•
12 replies
Quollveth Usernames

email worker example not working

im trying to make a email worker to handle a contact form, i tried deploying the example worker from the email workers page but it doesnt work and gives a js runtime error
Cannot read properties of undefined (reading 'send')
Cannot read properties of undefined (reading 'send')


im using the example from here
https://developers.cloudflare.com/email-routing/email-workers/send-email-workers/

i have modified the sender and recipient emails to be one from my domain with email routing active

i have added the node js compat flag needed by mimetext and deployed via wrangler from local development

it deploys with no errors but doesn't work when accessed, be it via the browser or by sending a POST directly to the worker via curl, i only get the error as a response
Cloudflare Docs
Send emails from Workers | Cloudflare Email Routing docs
You can send an email about your Worker’s activity from your Worker to an email address verified on Email Routing. This is useful for when you want to know about certain types of events being triggered, for example.
Send emails from Workers | Cloudflare Email Routing docs
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

email worker not working
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
3y ago
email worker webhook not working
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
3y ago
Email Worker
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
3y ago