Postboi is a framework-agnostic email library optimised for SvelteKit. It works with a
variety of email providers and turns your FormData into tidy HTML emails, with zero
configuration.
Import send, call it, done — the provider and credentials come from environment
variables, so the same line of code works whether you’re on Resend, Postmark, Mailgun, or
any of the other supported providers.
Features
- 👨💻 Zero configuration — works out of the box with minimal setup.
- 🔌 Provider-based — swap email providers without changing your code.
- 📝 Smart FormData parsing — automatically converts
FormDatato HTML tables. - 🎯 Grouped fields — organise form fields with
fieldset→fieldsyntax. - 📎 Attachments — attach files directly from form inputs or
Fileobjects. - 🛡️ Type-safe — full TypeScript support with normalised error handling.
How it fits together
There are three ways to use Postboi, from least to most explicit:
- Zero-config
send()— readsPOSTBOI_PROVIDERand credentials from the environment. Best for apps where one provider is set per environment. postboi/kitform actions — a one-line SvelteKit action that readsFormData, sends it, and returns a result.- A provider instance —
new Resend({ ... })when you want an explicit instance or you’re on a runtime without ambient env vars.
Start with the Quick start and let the CLI wire everything up for you, or set things up by hand with Manual setup.