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

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

Next steps