MailMock is a lightweight SMTP server that intercepts outgoing mail so you can test, preview and debug — without touching a real inbox.
A complete mock mailbox for developers — capture, inspect, analyze and stress-test your outgoing messages.
Accept mail on a plain SMTP port and capture it — nothing is ever delivered to real recipients.
Every message is scored for spam (0–100), checked for spoofing and scanned for viruses — with optional ClamAV & Rspamd.
Instantly find messages by subject, sender, recipient or body content with live filtering.
Render the original email in a sandboxed iframe — scripts disabled and remote resources blocked, so untrusted mail can't run code.
New mail appears instantly over WebSocket — a toast pops up and the inbox refreshes automatically.
View and download every attachment to verify your email content end to end.
Read, search, mark read/unread, download and delete messages via a JSON API, with interactive Swagger UI docs.
Inject random SMTP errors to test how your app handles an unreliable mail server — toggle it at runtime.
Run zero-setup in-memory storage, or switch to MongoDB for persistence across restarts — capped by a configurable limit.
Recent improvements shipped to MailMock.
Every captured message now gets a spam score (0–100), a spoofing verdict from header heuristics, and a virus check on attachments — visible in the new Analysis tab and the REST API.
Optionally back the analysis with real ClamAV virus scanning and Rspamd spam scoring; MailMock falls back to the built-in analyzers when they're unavailable.
New messages now stream to the UI over WebSocket, with a toast notification and automatic list refresh — no manual reload.
MailMock can now simulate random SMTP errors so you can test edge cases and failure handling.
Set a configurable message limit — when it's reached, the oldest messages are removed automatically to keep your workspace clean and fast.
Added full dark mode support for email previews across all devices.
Major speed improvements in email iframe loading and rendering.
Point any SMTP client at our public server and watch your message land in the inbox instantly.
Send an email with your favorite SMTP client — no signup needed.
Quick start, sending & viewing mail, the REST API, mail analysis, configuration and self-hosting — all in one place.
Spin up your local email testing environment in a single command.
$ docker pull justmediapl/mailmock