A self-hosted Resend alternative, built on Cloudflare Workers.
Send and receive emails using your own Cloudflare infrastructure.
Important: Deployment is only the first step. You must complete the post-deployment configuration below for the project to function.
Click the button below to provision resources automatically:
To secure your Worker and enable API access:
- Go to Settings > Domains & Routes in your Worker dashboard.
- Enable One-click Cloudflare Access on your domain.
- Action Required: Copy
POLICY_AUDandTEAM_DOMAINfrom the modal and set them as Secrets in your Worker settings.
- Receive emails: Go to Email Service > Email Routing. Create a "Catch-all" rule pointing to this Worker.
- Send emails: Go to Email Service > Email Sending. Onboard your domain.
Use a Service Token to bypass the Access login challenge for programmatic requests.
- Go to Zero Trust Dashboard > Access > Service Tokens.
- Click Create Service Token.
- Save your Client ID and Client Secret securely.
- Navigate to Access > Applications and edit your Worker application.
- Under the Policies tab, add a new policy:
- Action:
Service Auth - Include:
Service Token(Select your newly created token).
- Action:
Include the following headers in your requests to authenticate with your Worker:
curl "https://<id>.workers.dev/api/emails" \
-H "CF-Access-Client-Id: <YOUR_CLIENT_ID>" \
-H "CF-Access-Client-Secret: <YOUR_CLIENT_SECRET>" \
-d '{
"from": "hello@yourdomain.com",
"to": ["user@example.com"],
"subject": "Hello from cfmail",
"html": "<h1>It works!</h1>"
}'