← All posts

Introducing Postboi: zero-config email for JavaScript apps

Postboi is zero-config email for your app. One command, one token, and mail() just works — no DNS, no card, no provider dashboard. Here's what it is and why it exists.

Sending email from a web app should be boring. In practice it rarely is: you pick a provider, learn their SDK, wire up DNS records, copy API keys between dashboards, and write the same HTML-email boilerplate you wrote on the last project. Postboi exists to make all of that disappear.

Postboi is zero-config email for your app. Run one command, get one token, and mail() just works — no DNS to configure, no credit card, no provider dashboard to babysit.

anywhere in your app
import { mail } from 'postboi'

await mail({ to: 'contact@example.com', subject: 'Hi', body: '<p>Hello</p>' })

What Postboi does

  • Zero configuration — one command gets you a token and a working setup.
  • Never locked in — Postboi speaks 20+ providers through the same mail() call. Outgrow the default or want your own keys? Change one line of config; your code never changes.
  • FormData in, email out — point a form at it and get a tidy HTML email back, with fieldset→field grouping and file inputs as attachments.
  • Type-safe — full TypeScript with normalised, predictable error handling.
  • Runs anywhere — Node, Bun, and edge runtimes like Cloudflare Workers.

Why we built it

Every email provider has a good SDK. The problem is that every SDK is different, and the choice of provider leaks into your codebase. Change your mind about deliverability or pricing six months in, and you're rewriting call sites.

Postboi puts a single, small API in front of all of them. Out of the box you don't even pick a provider — you get a token and start sending. Prefer your own keys? Set the provider once in a committed postboi.config.ts and keep secrets in your environment. Your code only ever sees mail().

postboi.config.ts
// postboi.config.ts  (committed)
import { config } from 'postboi'

export default config({
	provider: 'resend',
	default: { from: 'no-reply@example.com' }
})

Works with your framework

Postboi is deliberately framework-agnostic, with first-class guides for SvelteKit, Next.js, Astro, Nuxt, Remix, Hono, Express, and Cloudflare Workers.

Try it in one command

terminal
bunx postboi init

That's it. From there, read the quick start or browse the full documentation. We'd love your feedback while Postboi is in pre-release — open an issue or discussion on GitHub.

The Postboi mascot

Put the boi to work.

One command between you and your first delivered email.

Start sending — free