Bun

Use the Resent SDK with Bun’s native fetch and TypeScript.

Use the Resent SDK with Bun’s native fetch and TypeScript.

Install

npm i resent.one

Set RESENT_API_KEY in your server environment. Keep the key off the client.

Send an email

import { Resent } from "resent.one";
const resent = new Resent(Bun.env.RESENT_API_KEY);
await resent.emails.send({
from: "Acme <noreply@yourdomain.com>",
to: "you@example.com",
subject: "Hello from Bun",
html: "<strong>It works!</strong>",
});

Next steps