Local Email Server for Development
Catch and preview emails locally. One command, no signup.
npx @sendpigeon-sdk/cli devWhat You Get
SMTP Server
Runs on localhost:4125. Point any app's SMTP config here.
Web UI
View all caught emails at localhost:4100. HTML preview, headers, and more.
Zero Config
One npx command. No Docker, no Ruby gems, no account signup.
Two Ways to Use It
Use the SendPigeon SDK for zero-config routing, or any SMTP client via localhost:4125
import { SendPigeon } from "sendpigeon";
// Set SENDPIGEON_DEV=true in your environment
// Emails automatically route to localhost:4100
const client = new SendPigeon(process.env.SENDPIGEON_API_KEY);
await client.emails.send({
from: "app@example.com",
to: "user@example.com",
subject: "Test email",
html: "<p>Hello!</p>",
});All emails appear instantly in the web UI. No real emails sent.
How It Works
SendPigeon SDK
RecommendedStart the dev server
npx @sendpigeon-sdk/cli devSet environment variable
SENDPIGEON_DEV=trueDone! All SDK emails route to localhost automatically.
Zero config. Same code in dev and production.
Any SMTP Client
Start the dev server
npx @sendpigeon-sdk/cli devConfigure SMTP
localhost:4125View caught emails at localhost:4100
Works with Nodemailer, Python, Ruby, PHP, Go, and more.
Other Ways to Run
npx @sendpigeon-sdk/cli dev
pnpm dlx @sendpigeon-sdk/cli dev
npm i -g @sendpigeon-sdk/cli
Frequently Asked Questions
What is a local email server?
A local email server catches all outgoing emails from your application during development instead of sending them to real recipients. This prevents accidental emails to users while letting you preview and debug email content locally.
How is this different from Mailhog or Mailcatcher?
SendPigeon's dev server works the same way via SMTP on port 4125, but requires no installation - just run npx @sendpigeon-sdk/cli dev. If you use the SendPigeon SDK, setting SENDPIGEON_DEV=true routes emails automatically with zero SMTP configuration.
Do I need a SendPigeon account?
No. The local dev server works completely offline without any account or API key. It's free to use for any project. You only need an account if you want to send real emails in production.
What languages and frameworks are supported?
Any language that can send SMTP email works: Node.js (Nodemailer), Python (smtplib), Ruby (Rails ActionMailer), PHP (PHPMailer), Go, Java, and more. Just point your SMTP config to localhost:4125.
Where do I view caught emails?
Open http://localhost:4100 in your browser. You'll see all caught emails with HTML preview, plain text, headers, and metadata. Emails appear instantly - no refresh needed.
Ready to Send Real Emails?
SendPigeon makes it simple to send transactional emails at scale. Same SDK, same code - just remove the dev flag.