All frameworks

Send Email from Hono

Send emails from Hono on any runtime

1

Install the SDK

npm install sendpigeon
2

Set your API key

SENDPIGEON_API_KEY=your_api_key_here

Get your API key from the dashboard.

3

Send your first email

typescript
import { Hono } from "hono";
import { SendPigeon } from "sendpigeon";

const app = new Hono();

app.post("/contact", async (c) => {
  const client = new SendPigeon(c.env.SENDPIGEON_API_KEY);
  const { email, name } = await c.req.json();

  await client.emails.send({
    from: "hello@yourdomain.com",
    to: email,
    subject: `Thanks for reaching out, ${name}!`,
    html: `<h1>We got your message</h1><p>We'll get back to you soon.</p>`,
  });

  return c.json({ success: true });
});

export default app;

Why use SendPigeon with Hono?

  • Works on Cloudflare Workers
  • Deno, Bun, Node.js support
  • Ultrafast and lightweight
  • 99.9% deliverability with dedicated IPs
  • Real-time analytics and webhook events
๐Ÿงช

Testing locally? Use our local email server to catch emails without sending real ones.

๐ŸŽจ

Prefer visual editing? Build email templates with our free drag-and-drop builder. Learn more โ†’

Ready to send emails from Hono?

Start free with 3,000 emails/month. No credit card required.

Get Started Free
๐Ÿ“–

Other JavaScript frameworks