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.
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.tswith 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:
fetch, not their SDK.templatesModuleseam must behave identically regardless of transport.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.