We've all been there: you're developing a new feature—like a registration flow or a "forgot password" function—and you need to verify that the emails look right and contain the correct links. Using real SMTP servers during development is a hassle and comes with the constant risk of accidentally emailing real users.
The Problem with the Current Landscape
I spent a lot of time using tools like MailHog, MailCatcher (dockerge/mailcatcher), and MailDev (maildev/maildev). They were lifesavers back in the day, but they haven't kept up with modern development needs:
MailHog: The UI feels like a relic from 2010. Plus, the project was recently abandoned - something I only realized while writing this post.
MailCatcher: The UI feels like a relic from 2010. Plus, The project was abandoned just a few days ago which I only recognized by writing this post.
MailDev: A solid Node alternative, but it often lacks the snappiness and robust disk persistence that complex local workflows require. Furthermore, the RAM usage becomes heavy when collecting a large volume of emails on testing or staging servers.
I found myself wanting something lightweight, modern, container-friendly, and - most importantly - persistent by default.
Introducing: A New Mailcatcher based on Node.js
I decided to build a fresh alternative that focuses on what actually matters to developers today. It's a Node.js-based SMTP simulator designed to be a "set it and forget it" tool for your Docker Compose stack.
Why this version is different:
- Disk Persistence That Actually Works: Unlike many tools that keep emails in memory (and lose them on every container restart), this project stores incoming emails directly on disk as structured files. They are automatically reloaded when the server starts.
- Clean & Modern UI: A responsive Web UI that supports both English and German (additional languages can be added easily). It displays headers, HTML/Text content, and handles attachments properly, including downloads.
-
Built for Containers: Optimized for Docker and Docker Compose. No complicated setup - just a single service in your
yamlfile. However, it can still be run standalone without Docker. -
Auto-Retention: You don't have to worry about your disk filling up. You can set a
MAIL_RETENTION_DAYSvariable, and old emails are automatically purged. - CLI & API Integration: Need to reload emails or check the status via the command line? There's a dedicated CLI command and a simple GET endpoint for that.
Getting Started in 60 Seconds
The easiest way to use it is via Docker Compose. Just add this to your docker-compose.yml:
services:
mailcatcher:
image: erkenes/mailcatcher
ports:
- "2525:2525" # SMTP Port
- "3000:3000" # Web UI Port
volumes:
- mail-data:/data/mails
environment:
MAIL_RETENTION_DAYS: 7
volumes:
mail-data:
Simply point your application's SMTP settings to localhost:2525 (no auth required), and open http://localhost:3000 to see your emails arriving in real-time.
Features at a glance
- SMTP Server: Fast and reliable, no TLS/Auth hurdles for local development.
- Attachment Support: View and download files sent via email.
- Persistent Storage: Uses a UUID-based directory structure for every email.
- Customizable: Change the app title, ports, and polling intervals via Environment Variables.
Wrap up
We deserve tools that look good and work reliably. If you're tired of clunky UIs or losing your test emails every time you stop your Docker containers, give this new Mailcatcher a try.
I'd love to hear your feedback! What features are you missing in your current email testing workflow?
Check it out on GitHub: https://github.com/erkenes/mailcatcher
Docker Hub: erkenes/mailcatcher
GitHub Container Registry: ghcr.io/erkenes/mailcatcher
Top comments (1)
a chance for mailpit