Mailgrid is a high-performance, ultra-lightweight CLI tool written in Go for sending bulk emails via SMTP from CSV or Google Sheets. Built for speed, reliability, and minimalism — no bloated web UIs, just powerful automation.
- Bulk email sending from CSV files or Google Sheets
- Dynamic templating with Go's
text/templatefor personalized content - Real-time monitoring dashboard with live delivery tracking
- Resumable delivery with offset tracking for interrupted campaigns
- Advanced scheduling with cron support and auto-start scheduler
- High performance with connection pooling, batching, and concurrent processing
- Production ready with zero dependencies, cross-platform support
Quick install:
# Linux & macOS curl -sSL https://raw.githubusercontent.com/bravo1goingdark/mailgrid/main/install.sh | bash # Windows (PowerShell) iwr -useb https://raw.githubusercontent.com/bravo1goingdark/mailgrid/main/install.ps1 | iex Download binaries: GitHub Releases • Installation Guide
Setup:
-
Create
config.json:{ "smtp": { "host": "smtp.gmail.com", "port": 587, "username": "your-email@gmail.com", "password": "your-app-password", "from": "your-email@gmail.com" } } -
Test installation:
mailgrid --env config.json --to test@example.com --subject "Test" --text "Hello!" --dry-run
Single email:
mailgrid --env config.json --to user@example.com --subject "Hello" --text "Welcome!"Bulk emails from CSV:
mailgrid --env config.json --csv recipients.csv --template email.html --subject "Hi {{.name}}!"With monitoring:
mailgrid --env config.json --csv recipients.csv --template email.html --monitor --concurrency 5Preview before sending:
mailgrid --env config.json --csv recipients.csv --template email.html --previewResumable delivery:
# Start campaign (automatically tracked) mailgrid --env config.json --csv recipients.csv --template email.html # Resume if interrupted mailgrid --env config.json --csv recipients.csv --template email.html --resume # Start fresh mailgrid --env config.json --csv recipients.csv --template email.html --reset-offsetSchedule emails for later:
# One-time scheduling mailgrid --env config.json --to user@example.com --subject "Reminder" --text "Meeting at 3pm" --schedule-at "2025-01-01T10:00:00Z" # Recurring (every 30 minutes) mailgrid --env config.json --csv subscribers.csv --template newsletter.html --interval "30m" # Cron-based (daily at 9 AM) mailgrid --env config.json --csv recipients.csv --template report.html --cron "0 9 * * *"Manage scheduled jobs:
mailgrid --jobs-list # List all jobs mailgrid --jobs-cancel "job-id-123" # Cancel specific job mailgrid --scheduler-run # Run as daemon| Short | Long Flag | Description |
|---|---|---|
-e | --env | Path to SMTP config JSON |
-f | --csv | Path to recipient CSV file |
-u | --sheet-url | Public Google Sheet URL |
-t | --template | Path to email HTML template |
-s | --subject | Email subject line |
-d | --dry-run | Render emails without sending |
-p | --preview | Start preview server |
-c | --concurrency | Number of concurrent workers |
-m | --monitor | Enable monitoring dashboard |
-a | --attach | File attachments |
-w | --webhook | HTTP URL for notifications |
- 📘 Complete Documentation - Full CLI reference and examples
- 🚀 Installation Guide - Detailed setup instructions
- 🤝 Contributing Guide - How to contribute to the project
📄 Licensed under BSD-3-Clause — see LICENSE