Send smarter, personalized emails in bulk with ease. Leverage the power of Node.js, Next.js, and background processing for efficient and reliable email campaigns.
Mailpilot is a full-stack web application designed to streamline your mass email communication. Upload your contact lists, compose personalized messages, and let Mailpilot handle the efficient delivery and tracking of your emails.
β¨ Watch the Demo Video β¨
- π§ Bulk Email Sending: Send emails to thousands of recipients effortlessly.
- π Contact List Management: Easily upload contacts via Excel (.xlsx, .xls) or CSV files.
- βοΈ Robust Background Processing: Utilizes BullMQ and Redis for reliable, asynchronous email dispatch.
- β±οΈ Real-time Status Tracking: Monitor the delivery status of each email in your campaign.
- π Exportable Reports: Download campaign results and delivery statuses.
- π Secure Authentication: JWT-based authentication for protecting user data and campaigns.
- π Modern UI: Responsive and user-friendly interface built with Next.js and Tailwind CSS.
- β‘ SMTP Integration: Configure with your preferred SMTP provider (e.g., Gmail, SendGrid).
- (Future) AI-Powered Content Assistance: Planned integration with Generative AI for email content suggestions.
| Landing Page | User Login | User Signup |
|---|---|---|
![]() |
![]() |
![]() |
| Dashboard Overview | File Upload Process | Successful File Upload |
|---|---|---|
![]() |
![]() |
![]() |
| Email Composer | Email Sent | Downloaded Report |
|---|---|---|
![]() |
![]() |
![]() |
Frontend (Next.js) β API Gateway β Queue System β Worker Processes β Email Providers
β β β β β
React UI Express API BullMQ Parallel Gmail API
Redis Workers
Mailpilot uses a professional queue-based architecture for reliable email processing:
-
API Layer:
- Rate-limited endpoints prevent abuse
- Request validation ensures data integrity
- Authentication middleware secures access
-
Queue System:
- BullMQ + Redis for persistent job storage
- Jobs survive server restarts
- Configurable concurrency and retries
-
Worker Processes:
- Parallel email processing
- Intelligent batch sizing
- Provider-aware rate limiting
-
Status Tracking:
- Real-time batch progress monitoring
- Detailed success/failure reporting
- Historical data for analytics
- Next.js 15 - React framework with App Router
- React 19 - UI component library
- TailwindCSS 4 - Utility-first CSS framework
- TypeScript - Type-safe JavaScript
- Node.js - JavaScript runtime
- Express 5 - Web framework
- MongoDB - Database
- Redis - Queue storage and caching
- BullMQ - Queue management system
- TypeScript - Type-safe JavaScript
- Nodemailer - Email sending library
- ExcelJS - Spreadsheet processing
- BullMQ - Background job processing
- Node.js (v18.x or later recommended)
- npm (v8.x or later) or Yarn
- MongoDB instance (local or cloud-hosted like MongoDB Atlas)
- Redis instance (local or cloud-hosted)
- SMTP server credentials (e.g., Gmail App Password)
-
Clone the Repository:
git clone https://github.com/SarthakRawat-1/Mailpilot.git cd Mailpilot -
Backend Setup:
cd Backend npm installCreate a
.envfile in theBackenddirectory and populate it with your configuration. See Environment Variables section for details.cp .env.example .env # If you create an example file # Then edit .env with your values
-
Frontend Setup:
cd ../frontend npm install -
Redis Setup: Ensure your Redis server is running and accessible. Update Redis connection details in the backend
.envfile if they differ from defaults. -
SMTP Configuration (Gmail Example):
- Enable 2-Factor Authentication on your Google Account.
- Generate an "App Password" for Mail on Windows Computer (or similar).
- Use this App Password as
SMTP_PASS(andEMAIL_PASSWORDif it's the same) in the backend.envfile. - Set
SMTP_USERto your Gmail address andSMTP_HOSTtosmtp.gmail.com.
-
Start the Backend Server:
cd Backend npm run devThe backend server will typically run on
http://localhost:8101. -
Start the Frontend Development Server:
cd frontend npm run devThe frontend application will typically run on
http://localhost:3000. -
Access Mailpilot: Open your browser and navigate to
http://localhost:3000.
- Supported columns: Name, Email, Company, etc.
- Automatic validation of email formats
- Duplicate detection and handling
- Rich text editor with formatting options
- File attachments support
- Real-time progress tracking
- Detailed delivery statistics
- Failure reporting and retry options
- Delivery success rates
- Detailed error reports
- Export results to spreadsheets
Mailpilot provides a comprehensive REST API for integration with other systems.
POST /api/signup- Create a new user accountPOST /api/login- Authenticate and receive JWT token
POST /api/sendmail- Queue new email batch for sendingGET /api/batch-status/:batchId- Get status of email batchGET /api/queue-stats- Get queue system statistics
POST /api/upload- Upload contact spreadsheets
Mailpilot is designed for high-performance email delivery:
-
Scalable Architecture:
- Horizontally scalable worker processes
- Redis-backed queue for high throughput
- Stateless API design
-
Resource Optimization:
- Background processing reduces API response times
- Intelligent batching minimizes provider load
- Automatic retry with exponential backoff
-
Provider Compliance:
- Gmail API rate limit adherence
- Dynamic delay calculation
- User quota management
# Server Configuration
PORT=8101
# MongoDB Configuration
CONNECTION_STRING=your_mongodb_connection_string # e.g., mongodb://localhost:27017/mailpilot
# JWT Configuration
JWT_SECRET=your_very_strong_and_secret_jwt_key # Min 32 characters
# SMTP Configuration (Example for Gmail)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587 # Or 465 if using SSL
SMTP_USER=[email protected]
SMTP_PASS=your_gmail_app_password # Important: Use App Password for Gmail
# Redis Configuration (for BullMQ)
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD= # Leave blank if no password, otherwise your Redis password
# Frontend URL (for CORS)
FRONTEND_URL=http://localhost:3000This project is licensed under the ISC License. See the LICENSE file for details.
- Sarthak Rawat - GitHub Profile








