A lightweight and developer-friendly email SDK for Node.js that simplifies sending emails with zero-config setup, bulk sending, and prebuilt templates like OTP and welcome emails.
- ⚡ Simple & clean API
- 📤 Bulk email sending with concurrency control
- 🎨 Prebuilt templates (OTP, Welcome)
- 🔁 Retry mechanism with backoff
- ⏱️ Rate limiting to prevent spam blocking
- 🌐 Multi-provider support (Gmail, SMTP)
- 🔐 Secure usage with environment variables
npm install @graminpoly123/easy-mailerimport mailer from "@graminpoly123/easy-mailer";
mailer.init({
provider: "gmail",
user: process.env.EMAIL_USER,
pass: process.env.EMAIL_PASS,
});await mailer.send({
to: "user@gmail.com",
subject: "Hello 🚀",
text: "This is a test email",
});await mailer.sendOTP({
to: "user@gmail.com",
code: 123456,
});await mailer.bulkSend({
to: ["a@gmail.com", "b@gmail.com"],
subject: "Bulk Email 🚀",
template: "welcome",
data: { name: "User" },
concurrency: 2,
});await mailer.send({
to: "user@gmail.com",
subject: "Welcome",
template: "welcome",
data: { name: "Nikhil" },
});mailer.init({
provider: "smtp",
host: "smtp.yourserver.com",
port: 587,
user: "your-email",
pass: "your-password",
});Create .env.local:
EMAIL_USER=your@gmail.com
EMAIL_PASS=your_app_password- Use Gmail App Password, not your normal password
- This package works only on backend (Node.js)
- Do not expose credentials on frontend
- Uses a provider system (Gmail / SMTP)
- Handles bulk emails with concurrency + rate limiting
- Retries failed emails automatically
- Supports dynamic templates
import mailer from "@graminpoly123/easy-mailer";
mailer.init({
user: process.env.EMAIL,
pass: process.env.PASS,
});
await mailer.sendOTP({
to: "user@gmail.com",
code: 123456,
});- SendGrid / Mailgun support
- Email tracking (open/click)
- Dashboard for logs & analytics
- Queue system with Redis
email, nodemailer, nodejs, bulk-email, smtp, gmail, otp, email-templates
Built with ❤️ by Nikhil Vitthal Kandhare and help by Saraswati Adkine
If you found this useful, please ⭐ the repo and share it!