Resender
Cloudflare Worker for managing Resend API contacts with double opt-in functionality.
Features
- Contact Form: Handles form submissions with spam protection
- Cloudflare Turnstile captcha verification
- Honeypot field detection
- Comprehensive request metadata collection for spam identification:
- IP address (via CF-Connecting-IP)
- User agent
- Referer
- Geographic location (country, region, city, timezone)
- Network information (ASN, AS Organization, Cloudflare Colo)
- Timestamp
- Double Opt-in Subscription: Email confirmation workflow with KV storage
- Audience Management: Support for multiple Resend audiences
Setup
- Install dependencies:
npm install- Set your Resend API key:
wrangler secret put RESEND_API_KEY- For local development, create a
.dev.varsfile:
RESEND_API_KEY=your-api-key-hereDevelopment
Run locally:
npm run devDeployment
Deploy to Cloudflare:
npm run deployConfiguration
Edit wrangler.toml to configure:
- Email sender details
- Confirmation URL
- Audience mappings
- KV namespace bindings
License
AGPL-3.0