A lightweight Go API to send emails via REST or an HTMX-powered interface, featuring scheduled sending and concurrent processing with a goroutine-based worker pool.
- 📤 Email sending via REST API or HTML/HTMX interface
- ⏱ Scheduled sending with a built-in scheduler
- 👷 WorkerPool using goroutines for concurrent task processing
- 🎯 Rate limiting to control throughput
- 📦 Built-in HTML templates
- Go 1.24+
- SMTP server credentials (e.g., Gmail with app password)
- Environment variables (create a
app.envfile):
FROM="your.gmail"
PASSWORD="your.app.password"
HOST="your.stmp.server"
PORT=587
git clone https://github.com/Moth13/Mailer.git
cd mailer
go mod download
go build -o moth-mailer .
./moth-mailer
or
make server
make test
Send an immediate email (POST)
curl -X POST http://localhost:8080/api/mail/send \
-H "Content-Type: application/json" \
-d '{
"to": "dest@example.com",
"subject": "Hello GoMailer!",
"body": "This is a test 🌟"
"scheduled_at": "2025-05-10T15:15"
}'
Visit http://localhost:8080/ to access the interactive form
- Fork the project
- Create your feature branch (
git checkout -b feature/my-feature) - Commit your changes
- Push to your branch
- Open a Pull Request
MIT License - See LICENSE
Developed with ❤️ by [Moth13] | 2025 Full documentation | Advanced examples