Home / Guides / Free Mailtrap alternative

A free Mailtrap alternative for testing your app's emails, and how to switch

Mailtrap's Email Sandbox is a good fake SMTP server, but its free plan is small: as of November 16, 2026 it allows 50 test emails a month, one sandbox that keeps the last 10 emails, one user and no sandbox email address. When a test suite or a team outgrows that, there are free options that keep going. This guide compares them and shows the two settings you change to move a project over.

Short answer.

For tests on your own machine or in a CI job, run Mailpit: free, open source, unlimited, and the app only needs its SMTP host changed to localhost:1025. For mail sent by a deployed test or staging system that a whole team has to see, use a hosted test inbox. MailPier Inbox has a free plan with 100 messages a month and real addresses, and its paid plans start at 10,000 messages a month.

What Mailtrap's free plan includes

Checked on Mailtrap's pricing page on November 16, 2026 (Email Sandbox, Free):

  • 50 test emails a month.
  • 1 sandbox, and 10 emails kept in it: the oldest is removed when the 11th arrives.
  • 1 user.
  • No sandbox email address, so mail reaches the sandbox only through its SMTP credentials.

The first paid Sandbox plan, Basic, was $17 a month ($14 a month billed yearly) for 500 test emails. Mailtrap sells its Sandbox, its sending service and its marketing tools as separate products, each with its own free plan, so the sending free plan does not raise the Sandbox limits.

The free options compared

Mailtrap Sandbox FreeMailpit (self-hosted)MailPier Inbox Free
Where it runsHostedYour machine, server or CI containerHosted
Emails a month50No limit100
Emails keptLast 10Newest 500 by default (--max, or by age with --max-age)15 minutes to 1 hour, then permanently deleted
Users1Anyone who can reach its web page1
How mail gets inSMTP with sandbox credentialsSMTP on port 1025SMTP catcher, or a real address such as anything@acme.mailpier.io
API for testsYesYes (REST)Yes (REST), waits for the mail on the server
Cost to growFrom $17 a month for 500Free; you run and secure itFrom $19 a month for 10,000

Mailtrap figures from its pricing page, MailPier Inbox figures from mailpier.io/pricing, both checked November 16, 2026. A full feature-by-feature table is on MailPier Inbox vs Mailtrap.

Option 1: Mailpit on your machine or in CI

Mailpit is one program with an SMTP server and a web inbox. It accepts every message and delivers none. Start it from its release download or with Docker:

docker run -d --name mailpit -p 8025:8025 -p 1025:1025 axllent/mailpit

The inbox is at http://localhost:8025. It suits a developer's own machine and a CI job that starts the app and Mailpit side by side (the Azure DevOps pipeline guide shows one as a service container). It is less suited to a shared test or staging server: someone has to host it, keep it patched and put a login in front of the web page, because Mailpit's inbox and API are open to anyone who can reach them unless you give it a password file (--ui-auth-file).

Option 2: a hosted test inbox

When the mail comes from a deployed system and testers, developers and pipelines all need to see it, a hosted inbox saves running a server. MailPier Inbox's Free plan gives one environment with real addresses on mailpier.io and an SMTP catcher; the Starter plan ($19 a month) has 10,000 messages a month, three environments and five members.

Switch a project from Mailtrap in two steps

1. Change the SMTP settings

Mailtrap's Sandbox works through SMTP credentials from the sandbox's Integration tab, so the switch is a configuration change, not a code change. Replace the host, port, user name and password in the test configuration only:

# Mailpit (local or CI): no TLS, no login
Host = localhost    Port = 1025

# MailPier Inbox SMTP catcher: STARTTLS on 587 (or 2525), login required
Host = smtp.mailpier.io    Port = 587
User = qa.acme             Password = mps_...   (from the environment's SMTP tab)

For MailPier Inbox, create the password on the environment's SMTP tab; the user name is <environment>.<account>. Keep the password in user secrets, a key vault or a pipeline secret, never in the file. Every message is caught, whoever it is addressed to, and nothing is delivered. Details: SMTP catcher settings.

2. Change the test code that reads the mail

Tests that read Mailtrap's sandbox call its API (GET https://mailtrap.io/api/sandboxes/{sandbox_id}/messages with an Api-Token header) and usually loop until the message shows up. Replace that call. With Mailpit, read its /api/v1/messages endpoint (the verification code guide has a full PowerShell and Node.js example). With MailPier Inbox, one call waits on the server until the mail arrives, so the loop goes:

# wait up to 60 seconds for the mail to this test's address (204 = nothing arrived)
curl -s "https://api.mailpier.io/v1/messages/wait?to=signup-42@qa.acme.mailpier.io&timeoutSeconds=60" \
  -H "Authorization: Bearer $MPI_KEY"

A 200 answer is the message, with its links and one-time codes already pulled out; 204 means nothing arrived in time. In .NET the MailPier.Inbox.Client package does the same with WaitForMessageAsync.

Things to check before you switch

  • Retention works differently. Mailtrap keeps a number of emails per sandbox; MailPier keeps mail for a time and then deletes it. A test that reads an email hours later needs a longer retention (Starter and Team keep up to 12 hours).
  • Count recipients, not sends. On MailPier each accepted recipient is one message, so a mail to three addresses counts three times.
  • HTML and spam reports. If your team relies on Mailtrap's HTML check or spam report, compare them with MailPier's email check report (SPF, DKIM, DMARC, spam score, links, placeholders) on a few real emails first.
  • Keep the test config separate. Whatever you switch to, the production configuration must keep pointing at the real mail server.

Questions

Is Mailtrap free?

Mailtrap's Email Sandbox has a free plan: as of November 16, 2026, 50 test emails a month, one sandbox that keeps 10 emails, one user and no sandbox email address. Paid Sandbox plans start at $17 a month for 500 test emails.

What is the best free alternative to Mailtrap?

For local development and CI, Mailpit: it is free, open source and has no message limit, and the app only needs its SMTP host changed. For a shared test or staging system, a hosted test inbox such as MailPier Inbox, whose Free plan has 100 messages a month and real addresses.

Do I have to change my code to move off Mailtrap?

Usually not the app's code: the Sandbox works through SMTP, so only the SMTP host, port, user name and password change. Test code that reads mail through Mailtrap's API has to call the new tool's API instead.

Can Mailpit replace Mailtrap for a whole team?

It can if you host it on a server everyone reaches and protect its web page, since Mailpit's inbox and API have no login unless you give it a password file (--ui-auth-file). Someone also has to keep that server running and up to date.

How does MailPier Inbox compare with Mailtrap?

There is a side-by-side table with sources on mailpier.io/compare/mailtrap.

Related

Sources (checked November 16, 2026): Mailtrap pricing, Mailtrap Sandbox features and limits, Mailtrap Sandbox SMTP integration, Mailtrap API: get messages, Mailpit Docker images, Mailpit API v1, Mailpit runtime options, MailPier Inbox pricing, MailPier Inbox API reference, MailPier Inbox SMTP catcher.

An unhandled error has occurred. 🗙