Pigeon is a lightweight, secure, and efficient mailing microservice built with Express.js and Nodemailer. It supports bulk and single email sending with batching, API key protection, and easy integration for any backend or event-driven workflow.
- Overview
- Tech Stack
- Packages & Libraries
- Getting Started
- Setup
- Features
- API Reference
- Demo & Screenshots
- Acknowledgments
- License
Pigeon provides a simple REST API for sending emails in bulk or individually. It is designed for reliability, scalability, and security, making it ideal for notifications, newsletters, and transactional email use cases.
| Layer | Tech |
|---|---|
| Language | TypeScript |
| Framework | Express.js |
| Mailer | Nodemailer |
| Docs | Swagger UI |
| Package Tool | Bun / npm |
| Editor | VS Code |
Prerequisites:
- Node.js or Bun
- Git
- VS Code
- Clone the repository:
git clone https://github.com/Atmiya-Developer-Students-Club/Pigeon.git
- Navigate into the project:
cd pigeon - Install dependencies:
bun install # or npm install - Copy
.env.exampleto.envand fill in your SMTP and API key settings. - Start the service:
bun run index.ts # or npm start - Visit Swagger API docs at http://localhost:3001/api-docs
- 📧 Send bulk emails with batching (configurable batch size & delay)
- 📩 Send single emails with the same API
- 🔑 API key protection for all endpoints
- 📝 Swagger UI for interactive API docs
- 🪵 Request and error logging
- ⚡ Simple, fast, and production-ready
All endpoints require an Authorization: Bearer <API_KEY> header.
Send emails to multiple recipients in batches.
Request Body:
{
"subject": "Hello!",
"html": "<b>Welcome!</b>",
"recipients": ["user1@example.com", "user2@example.com"],
"attachments": [
{
"filename": "poster.png",
"href": "https://example.com/poster.png"
}
]
}Response:
{
"success": true,
"sent": 2,
"failed": 0
}Send an email to a single recipient.
Request Body:
{
"subject": "Hi!",
"html": "<b>Just you!</b>",
"recipients": ["user@example.com"],
"attachments": [
{
"filename": "poster.png",
"href": "https://example.com/poster.png"
}
]
}Response:
{
"success": true,
"sent": 1,
"failed": 0
}Visit http://localhost:3001/api-docs for full Swagger documentation and live testing.
To be added.
This project is licensed under the MIT License.
Pigeon – Reliable, secure, and simple email delivery for your apps.