Contact form logic: CORS evaluation, validation, honeypot handling, and email orchestration. Will be paired with one or more providers, (Resend or Nodemailer), and a platform, (Vercel).
handleContact(req, deps)— orchestrates the full contact-form flowevaluateCors(req, allowedOrigins)— CORS decision logicsendEmail(config, body)— dispatches to a givenEmailProviderisValidBody(body)— input validation- Types:
ContactRequest,ContactResult,EmailProvider,EmailPayload,EmailBody
MIT License - see LICENSE for details.