Add inbound email capture via Cloudflare Email Worker

- Cloudflare Email Worker forwards hello@ and nate@ to Gmail and POSTs
  parsed MIME email to /api/inbound-email as admin inbox entries
- New server route authenticates via shared secret and deduplicates by
  Message-ID before storing inbound emails as contact submissions
- Admin inbox shows "email" badge for inbound messages; reply composer
  opens blank with auto-subject "Re: [original]" and signature preview
- Documents setup steps in cloudflare/email-worker.js and .env.example

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nmemmert
2026-06-30 11:23:27 -04:00
parent f83682879b
commit 4b411f763f
6 changed files with 389 additions and 5 deletions
+5
View File
@@ -21,3 +21,8 @@ RESEND_SEGMENT_ID=
# During testing you can leave this as-is (uses Resend's shared domain).
# For production: verify your own domain at resend.com/domains and change this.
RESEND_FROM=Verse by Verse with Nate <hello@versebyversewithnate.us>
# Shared secret for the Cloudflare Email Worker webhook.
# Must match the WEBHOOK_SECRET variable set in the Cloudflare Worker settings.
# Generate with: openssl rand -hex 32
INBOUND_EMAIL_SECRET=