Handles POST /api/contact from the contact form on the homepage and emails
the submission to the team using Cloudflare Email Service. Replies go straight
to the person who filled in the form.
CONTACT_TO, billing to BILLING_TO
(see vars in wrangler.jsonc).slipboss.com/api/contact, so the site and form
stay on the same origin.In the Cloudflare dashboard, onboard slipboss.com for sending in
Email Service (adds the SPF/DKIM DNS records). The CONTACT_FROM
address must be on that domain.
Deploy:
cd workers/contact
npm install
npx wrangler login
npm run deploy
npm run dev
Emails are not really sent locally; wrangler prints them and writes the body
to .wrangler/tmp/email/.