Hono

Send email from Hono apps on Node, Bun, or edge runtimes.

Send email from Hono apps on Node, Bun, or edge runtimes.

Install

$npm i resent.one

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

Send an email

1import { Hono } from "hono";
2import { Resent } from "resent.one";
3
4const app = new Hono();
5
6app.post("/send", async (c) => {
7 const resent = new Resent(process.env.RESENT_API_KEY);
8 const result = await resent.emails.send({
9 from: "Acme <noreply@yourdomain.com>",
10 to: "you@example.com",
11 subject: "Hello from Hono",
12 html: "<strong>It works!</strong>",
13 });
14 return c.json(result);
15});
16
17export default app;

Next steps