Postboi is an email provider, and its SDK works the same in any framework: read the
request’s FormData in a React Router route action and hand it straight to mail(). Postboi extracts the special fields and
renders the rest into a tidy HTML table. This is framework mode, which is what Remix became,
so a Remix 2 app upgraded to React Router works the same way.
Register the route in app/routes.ts with index('routes/home.tsx'). Field names use the fieldset→field syntax. 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/react ships the spam protection (honeypot plus, on the Postboi provider,
the managed invisible captcha) as a single prop-free component. It renders inside your
existing form, so React Router’s <Form> keeps working:
The publishable key is baked in by bunx postboi sync. See Spam protection.
Runnable example: examples/react-router-provider-postboi.