Adapters
Resend
Send through Resend with its native SDK or direct HTTP API.
Native SDK
pnpm add @postbote/core @postbote/adapter-resendimport { resend } from "@postbote/adapter-resend";
const adapter = resend({ apiKey: process.env.RESEND_API_KEY! });Pass client to inject an existing Resend instance for custom setup or testing.
HTTP adapter
pnpm add @postbote/core @postbote/adapter-resend-httpimport { resendHttp } from "@postbote/adapter-resend-http";
const adapter = resendHttp({
apiKey: process.env.RESEND_API_KEY!,
timeoutMs: 30_000,
});The HTTP adapter accepts baseUrl and a custom fetch implementation. Use it for fetch-compatible edge runtimes or when you do not want the Resend SDK in your dependency tree.
Resend maps 401 to AUTH, 422 to INVALID_MESSAGE, 429 to RATE_LIMITED, and 5xx or network failures to PROVIDER_UNAVAILABLE.