惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
C
Check Point Blog
J
Java Code Geeks
腾讯CDC
Martin Fowler
Martin Fowler
MongoDB | Blog
MongoDB | Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 三生石上(FineUI控件)
Apple Machine Learning Research
Apple Machine Learning Research
大猫的无限游戏
大猫的无限游戏
Engineering at Meta
Engineering at Meta
罗磊的独立博客
Last Week in AI
Last Week in AI
B
Blog
IT之家
IT之家
S
SegmentFault 最新的问题
D
DataBreaches.Net
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
GbyAI
GbyAI
博客园 - 聂微东
U
Unit 42
有赞技术团队
有赞技术团队
Y
Y Combinator Blog
MyScale Blog
MyScale Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Testing Emails in 2026: Why I Built a Better Mailcatcher ...
Enes · 2026-04-26 · via DEV Community

Enes

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:

  1. 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.
  2. 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.
  3. Built for Containers: Optimized for Docker and Docker Compose. No complicated setup - just a single service in your yaml file. However, it can still be run standalone without Docker.
  4. Auto-Retention: You don't have to worry about your disk filling up. You can set a MAIL_RETENTION_DAYS variable, and old emails are automatically purged.
  5. 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:

Enter fullscreen mode Exit fullscreen mode

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

javascript #webdev #docker #productivity #node