Postboi is framework-agnostic: read the request’s FormData in an API route and hand it
straight to mail(). Postboi extracts the special fields and renders the rest into a tidy HTML table.
Point a multipart/form-data form at the route. Include hidden _subject and _reply_to fields, and mirror the email into _reply_to with a one-line oninput so replying reaches
the sender:
Field names use the fieldset→field syntax. API routes need SSR,
so set output: 'server' with an adapter in astro.config.mjs. The provider and default
recipient come from postboi.config.ts: a POSTBOI_TOKEN routes to the Postboi provider, or pick any provider.
Or use the Captcha component
postboi/astro ships the spam protection (honeypot plus, on the Postboi provider,
the managed invisible captcha) as a single prop-free component. Your form stays a
native <form>; just drop it inside:
The publishable key is baked in by bunx postboi sync. See Spam protection.
Runnable example: examples/astro-provider-postboi.