Email Testing

The best email sandbox, honestly compared

Five email sandboxes, sorted by the only question that matters: are you testing the message your code built, or testing that the message actually reached a real mail server?

On this page
  1. Decide which half of the problem you are testing
  2. Mailpit, if you want it local and free
  3. Ethereal Email, if you want zero setup
  4. Mailtrap, if you want the polished hosted version
  5. Mailosaur, if you also need SMS
  6. Where InboxDome fits, and where it is the wrong choice
  7. The short version

The best email sandbox is whichever one matches what you are actually trying to prove. If you want to see the message your code assembled without it ever leaving the machine, a local SMTP catcher wins and costs nothing. If you need evidence that the mail crossed the internet and that a receiving server accepted it, no catcher can help, because a catcher never lets the message leave. Work out which side of that line you are on, then pick the tool.

Decide which half of the problem you are testing

An email sandbox intercepts mail so it cannot reach real people. That one idea splits into two very different products.

Send-side capture puts a fake SMTP server where your real one used to be. You get the subject, the body, the headers and the rendered template, instantly and offline. Receive-side delivery gives you a real address on a real MX record, so the message actually travels and a real server decides whether to accept it.

Send-side tools are faster and cheaper. Receive-side tools are the only ones that can tell you whether the mail works. So the best email sandbox for one team is the wrong tool for another, and this split is the whole reason. What email sandboxing actually means covers the mechanics if that distinction is new.

Mailpit, if you want it local and free

If your answer above was send-side, the best email sandbox for most teams is Mailpit. It describes itself as “a small, fast, low memory, zero-dependency, multi-platform email testing tool & API for developers”, which is an accurate summary. It runs an SMTP server with optional STARTTLS or SSL/TLS, shows captured mail in a web UI that updates over websockets, and exposes “a REST API for integration testing”.

The extras are what make it the default recommendation. It ships an HTML check that scores mail client compatibility, a link check for message links and linked images, and a spam check that scores messages against a running SpamAssassin server. It can also relay or forward captured messages on to a different SMTP server. It is MIT licensed.

MailHog is the older tool of the same shape: an ESMTP server, an HTTP API to list, retrieve and delete messages, and its Jim chaos monkey for failure testing. If you already run it, it still works. For a new project, Mailpit is the one I would install.

Where it loses: everything about delivery. No DNS lookup, no MX record, no receiving server, so no authentication verdicts.

Ethereal Email, if you want zero setup

Ethereal is a hosted fake SMTP service aimed at Nodemailer and EmailEngine users, and it states plainly that “messages never get delivered and no real inbox is ever spammed”. You call createTestAccount(), get SMTP credentials instantly with no signup or email verification, send through them, then open a preview URL. IMAP and POP3 access to the caught mail is available too.

For a Node service that only needs to eyeball its own templates, nothing is faster to adopt.

Where it loses: the same blind spot as any catcher, plus throwaway credentials that are easy to lose track of in CI. If yours has stopped catching, that failure has a short list of causes.

Mailtrap, if you want the polished hosted version

Mailtrap Email Sandbox captures SMTP traffic from staging and development environments into a virtual inbox rather than delivering it. On top of that it offers spam analysis, HTML and CSS compatibility checking, header validation, an API for automating test flows, multiple sandboxes grouped into projects, team sharing, and forwarding selected messages to whitelisted real recipients. Setup is a credentials swap, with code samples for Rails, Java, .NET, Python, PHP and Node.

It is the most complete send-side product here, and the team features earn their keep when non developers need to look at a template. Check their pricing page for current tiers; we do not republish other companies’ numbers, because a stale figure on our site is worse than none. If cost is the sticking point, there is a separate write up on free Mailtrap alternatives.

Mailosaur, if you also need SMS

Mailosaur provides virtual inboxes and phone numbers behind a REST API, so one test can cover an emailed verification code and an SMS one. Its docs list SDKs for Node, Java, Python, Ruby, .NET, PHP, Go and browser JavaScript, plus integrations with Playwright, Cypress, Selenium, Cucumber, WebdriverIO, Robot Framework, Postman and more.

If your identity flow spans both channels, this is the short list, and nothing below replaces it.

Where InboxDome fits, and where it is the wrong choice

InboxDome is receive-only, which is the whole point. POST /v1/inboxes returns a working address in one call. Your app sends to it across the public internet, a real MX accepts it, and you long poll a wait endpoint with a timeout instead of a sleep(). Because the message genuinely arrived, assertions can cover SPF, DKIM and DMARC results alongside subject, content and links. Signed webhooks with replay protection push events out, there are SDKs, a CLI and a GitHub Action, and an MCP server exposes seven tools so an AI agent can drive the same flow. The free tier is 100 inbox tests a month with no credit card. The details are on the Email Testing API page.

It is the wrong choice when your build machine has no outbound network, when you want to inspect mail before it leaves your infrastructure, when you need to test sending (an InboxDome address can never send), when you need SMS, or when a mailbox has to sit around for weeks. Consumer inboxes hold mail for 24 hours by default and 7 days at most.

The short version

Templates and offline builds: Mailpit. A Node project that wants one line of setup: Ethereal. A team that needs shared review and spam scoring: Mailtrap. Email plus SMS: Mailosaur. Proving the mail actually arrived and authenticated: a receiving address such as InboxDome. Chosen that way, the best email sandbox is rarely a single product.

Most teams end up running two: a catcher for the fast inner loop, and a real address in the delivery suite. For the reasoning behind those categories rather than the product names, the four approaches page lays it out, and there is a broader roundup of email testing tools that goes wider than sandboxes alone. Once mail is genuinely arriving, the next question is usually whether it lands in the inbox or the spam folder.

Disclosure: InboxDome publishes this blog and makes the products it mentions. We describe what they do rather than promise results.

Key takeaways

  • There is no single winner: a local catcher and a real receiving address prove different things, and most teams eventually run both.
  • Mailpit is the one to reach for when you want an offline, zero cost SMTP catcher with a REST API for integration tests.
  • Ethereal is the fastest possible setup for Node projects because Nodemailer can create a test account for you in one call.
  • Mailtrap is the most complete hosted send-side sandbox, with spam scoring, HTML checking and team sharing.
  • No SMTP catcher can evaluate SPF, DKIM or DMARC, because those are decided by a receiving server a catcher never involves.

Sources

  1. Mailpit repository and feature list — Source for the SMTP capture, REST API, HTML check, link check and SpamAssassin features.
  2. Ethereal Email homepage — Source for the fake SMTP description and the no signup account flow.
  3. Mailtrap Email Sandbox product page — Source for SMTP capture into a virtual inbox, spam analysis and HTML checking.
  4. Mailosaur documentation — Source for the REST API inboxes, SMS testing and SDK list.

Links last checked September 11, 2026.

Frequently asked questions

What is the best email sandbox for a small team?

Start with Mailpit running next to your app. It costs nothing, works offline, and its REST API is enough for integration tests. Add a real receiving address later, when you need to prove delivery or read authentication results.

Can an email sandbox test SPF, DKIM and DMARC?

A local or hosted SMTP catcher cannot, because it intercepts the message before it leaves your infrastructure. Those checks are performed by the receiving server against DNS records for your sending domain, so you need mail that genuinely arrives somewhere.

Is Ethereal Email good enough on its own?

For a Node project that only needs to preview what it built, yes. Ethereal calls itself a fake SMTP service where messages never get delivered, and Nodemailer can create an account with no signup. It tells you nothing about real delivery.

Do I still need a sandbox if I have a spare mailbox?

A real mailbox polled over IMAP is faithful but operationally painful: credentials in CI, polling loops, provider throttling, one shared address that parallel runs collide on, and no automatic cleanup. Per test addresses remove that friction.

InboxDome TeamEmail infrastructure builders

The InboxDome team runs the temporary-email service and email-testing API this blog belongs to. We write about disposable inboxes, email privacy and testing transactional email, based on operating the infrastructure ourselves.