A Cloudflare Worker for handling email auto-replies and forwarding.
- Auto-replies to incoming emails
- Forwards emails with subjects to a specified address
- Customizable sender information and message content
This project uses environment variables to configure sender information, email addresses, and message content. This allows you to customize the behavior for different environments without committing sensitive information to git.
Copy .env.example
to .env.local
and fill in your actual values:
cp .env.example .env.local
Then edit .env.local
with your values:
SENDER_NAME
: Name displayed as the sender of auto-reply emailsSENDER_EMAIL
: Email address used as the senderREPLY_EMAIL
: Email address used for replies (usually same as SENDER_EMAIL)FORWARD_EMAIL
: Email address where messages should be forwardedORGANIZATION_NAME
: Organization name used in email message contentWEBSITE_URL
: Website URL referenced in email messages
For production deployment, set these environment variables in your Cloudflare Worker:
wrangler secret put SENDER_NAME
wrangler secret put SENDER_EMAIL
wrangler secret put REPLY_EMAIL
wrangler secret put FORWARD_EMAIL
wrangler secret put ORGANIZATION_NAME
wrangler secret put WEBSITE_URL
-
Install dependencies:
npm install
-
Set up environment variables (see above)
-
Run locally:
wrangler dev
wrangler deploy