Skip to content

HTTP-API email transport (Resend first) alongside SMTP #6

Description

@nipun-arora

Email sending is nodemailer/SMTP-only today (packages/astro-forms/src/server/notify.ts). Some hosts block outbound SMTP ports entirely, which currently means no notifications and no abandonment emails on those platforms.

Proposal: a transport seam in notify.ts with an HTTP-API adapter alongside the existing SMTP path. Resend is the obvious first adapter (single POST, token auth), but the seam should be shaped so Postmark/SES-over-HTTP adapters can follow without touching call sites.

Design constraints:

  • No new hard dependency: the Resend adapter should use fetch, not their SDK.
  • Config selects the transport; existing SMTP configs keep working unchanged (no breaking change).
  • Same envelope in both paths: templates, from/to handling, and the templatesModule seam must behave identically regardless of transport.
  • Failures log through the existing error path with enough context to tell transport errors from template errors.

This one has a bit of design surface, so if you want to pick it up, sketch the config shape in a comment here first and we'll agree on it before you write code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions