MailSlurp Alternative for Email Testing and Test Inboxes
A MailSlurp alternative for backend email tests: inbox types, wait methods and plans compared from its pages, with pytest and webhooks.

If your tests run against a backend rather than a browser, the way a service gets its test mail is the main design question. A sign-up endpoint sends a verification email, a billing job sends an invoice, a worker sends a digest, and the test has to catch each one. This guide looks at MailSlurp from that angle: how its inboxes and wait methods work, what its plans include, and how the same tests look on Mailcycle with pytest, a webhook receiver and a short retention.
What we say about MailSlurp below comes from its public pages, read on 26 and 27 November 2026. The pages are listed at the end.
How MailSlurp’s inboxes work
According to the MailSlurp docs, each inbox has a real email address, stored messages and an ID you can use from the dashboard, REST API or an SDK. The docs ask you to save both the returned address and the ID rather than derive one from the other, and they note that leaving the address unspecified creates a randomized address on a default domain that can change.
An inbox can be permanent or temporary. For temporary work you set expiresIn or expiresAt. The docs also describe a sending mode: with the “Permit” setting an inbox sends real outbound email, and with “Capture” it inspects outgoing messages without delivering them. The inbox type is chosen with inboxType, with values HTTP_INBOX and SMTP_INBOX.
How MailSlurp tests wait for mail
The wait-for page documents a family of methods. The common one is waitForLatestEmail, which takes inboxId, since, timeout in milliseconds and unreadOnly. Others wait for the first matching email, for a count of emails, or for the Nth email. The docs recommend capturing since before the action, and they note that messages start unread and that retrieving the full email marks it read.
That is a rich toolbox for one inbox receiving several messages. It also means a test has to decide which wait method fits.
MailSlurp plans, from its pricing page
Read on 26 November 2026 from https://app.mailslurp.com/pricing/. Prices are in US dollars per month.
| Plan | Price | Emails received a month | Inboxes kept | External sending a month | Custom domain |
|---|---|---|---|---|---|
| Free | $0 | 250 | Not kept | Not included | Not included |
| Starter | $19.99 | 2,500 | 250 | Not included | Add-on, paid separately |
| Pro | $69 | 5,000 | No limit | 500 | Add-on, paid separately |
| Growth | $199 | 5,000 | No limit | 500 | 1 included |
| Enterprise | Quote | Custom | Custom | Custom | Custom |
The pricing FAQ says the received allowance is shared: “a 5,000 emails received / month allowance means up to 5,000 messages in total, not 5,000 for each inbox.” Every plan lists “API, SDKs and webhooks”.
Mailcycle plans for service tests
Prices below are the ones on https://mailcycle.email/pricing/.
| Operator | Scale | Fleet | |
|---|---|---|---|
| Price a month | $15 | $19 | $99 |
| Addresses | 250 | 1,000 | 10,000 |
| Messages received a month | 250,000 | 750,000 | 4,000,000 |
| API keys | Yes | Yes, full API | Yes, advanced |
| Webhooks | Yes | Yes | Yes |
| Your own domains | On Scale and up | 10 | 50 |
Side by side
| MailSlurp | Mailcycle | |
|---|---|---|
| Plan that adds custom domains | Add-on on Starter and Pro, included on Growth ($199) | Scale at $19, 10 domains |
| Inboxes kept on the first paid plan | 250 on Starter | 250 on Operator, 1,000 on Scale |
| Messages received a month on the first paid plan | 2,500 on Starter | 250,000 on Operator |
| MCP server | Hosted, OAuth or an agent key | mailcycle-mcp, runs on your machine |
| Mail encryption | Not compared here | Encrypted the moment it arrives, with keys from your recovery phrase |
MailSlurp lists emails received and inboxes created in a month. Mailcycle lists addresses held and messages received in a month.
Translating the MailSlurp calls
| In MailSlurp | In Mailcycle |
|---|---|
createInboxWithOptions |
mc.addresses.create(), with a prefix and a retention |
Temporary inbox with expiresIn |
A short retention, such as 24 hours |
| Permanent inbox | An address with a longer retention, such as 90 days |
waitForLatestEmail |
messages.waitFor or messages.wait_for |
since and timeout |
since and timeoutMs, or timeout in seconds in Python |
| Webhooks | A signed message.received event |
The shape of a test does not change: create, trigger, wait, read. What changes is that Mailcycle has one wait call, filtered by address, sender and subject, so there is no method to choose.
A pytest fixture in Python
import os
import re
import pytest
from mailcycle import Mailcycle
@pytest.fixture
def inbox():
mc = Mailcycle.with_api_key(os.environ["MAILCYCLE_API_KEY"], phrase=os.environ["MAILCYCLE_PHRASE"])
address = mc.addresses.create(prefix="svc")
def wait(subject: str) -> str:
message = mc.messages.wait_for(address_id=address.id, subject=subject, timeout=60)
return message.text
yield address.email_address, wait
def test_signup_sends_code(client, inbox):
email, wait = inbox
client.post("/signup", json={"email": email})
code = re.search(r"\b\d{6}\b", wait("verify")).group(0)
assert client.post("/verify", json={"email": email, "code": code}).status_code == 200
The test posts to your own API, so the whole path from endpoint to outbound mail is exercised. The Python guide, linked in the related reading, covers listing mail, attachments and sending.
Webhooks for services that react to mail
Some systems consume inbound mail rather than just test it: a support tool that creates tickets, or a parser that reads invoices. For these, a webhook is cleaner than polling. A signed message.received event reaches your HTTPS endpoint with retries. The signature is an HMAC-SHA256 of the timestamp, a full stop and the raw body, and each SDK has the check built in. See Receive email with a webhook for signed events, retries and deduplication.
Why the address-per-test model suits services
A service test is usually small and focused: one endpoint, one email. When the test owns its address, there is nothing to filter and nothing to clean up by hand. You also avoid a problem with shared inboxes, where two tests running at once see each other’s mail and the failure depends on timing. With one address each, the only message that can satisfy a wait is the one your test caused, and the failure message points at exactly one address. That clarity matters most in CI, where you read a log rather than watch the test run.
Retention instead of an inbox lifetime
MailSlurp distinguishes temporary from permanent inboxes. Mailcycle gives every address a retention instead: 24 hours, 7, 30 or 90 days, set per address. For test mail, 24 hours keeps the plan clean, and the address stays valid for as long as you keep it. If a test needs to look at mail days later, say a nightly digest, pick 7 days for that address.
Custom domains for staging
Staging environments often allow mail only to a known domain. On Scale you can use a domain you own, with 10 included, and choose address names yourself. See Role addresses on your own domain for the setup.
Migrating a suite, step by step
- List where your tests create inboxes and where they wait.
- Install the SDK for your language and create an API key on Operator or above.
- Replace inbox creation with
addresses.create, and keep the returned address in the test. - Replace each wait with
waitFor, filtering by subject. - Move any webhook receivers to the
message.receivedevent and verify the signature. - Run both services side by side for a day if you want a comparison, then retire the old client.
What backend email tests should assert
Service tests have different goals from browser tests, and the assertions are worth planning.
- Delivery happens. An endpoint that should send mail does, within the timeout. This catches a queue that is not running in the test environment.
- The template renders. The subject, the greeting and the key fields are correct. Match a few stable strings in
message.text. - The links point at the right host. A link built from the wrong base URL is a common bug in staging. Extract the first
https://URL and assert its host. - Idempotency. Call the endpoint twice and assert the address received one message or two, whichever your design requires.
- The sender and reply-to. Check
fromandreplyTo, which are fields on every message.
Unit, integration and smoke levels
Integration tests per pull request
Create an address in a fixture, run the flow, and delete nothing: a 24 hour retention does the cleanup. These run on every pull request, so keep them few and fast.
Smoke tests after a deploy
A single test that signs up with a fresh address and waits for the verification email tells you the whole path works in the environment you just deployed. If the wait times out, the deploy has broken email.
Scheduled checks in production
For a nightly digest or a weekly report, keep an address with 7 days of retention, subscribe it to the report, and check each morning that the latest message arrived. Create the address once and reuse it, so the check measures what real users receive.
One address per environment
Teams often run development, staging and production. Give each environment its own address prefix, such as dev, stg and prod, and set its retention to match its use. Because each address is an inbox, a message sent by staging cannot satisfy a test aimed at production. Labels in the app, visible only to you, record which suite owns which address.
Handling flaky delivery
Email is asynchronous, and a test that expects instant arrival will occasionally fail. Three habits keep suites steady:
- Use a generous
timeout, 60 seconds is common, and let the call return as soon as the message arrives. - Capture
sincebefore the action, so a late message from a previous run cannot match. - Fail with context. Catch the timeout and include the address and the time in the error, so you can find the address in the app.
Because waitFor listens on the event stream and falls back to checking the address every five seconds where the stream is not available, the call keeps working in constrained networks.
Reading attachments in service tests
Invoices and reports arrive as attachments. After the wait, call mc.messages.attachment(message, 0) to get the bytes, then assert the file type, size or contents. A PDF header check, for example, confirms the generator produced a PDF. An attachment shown inline has a contentId, which helps when you test HTML emails with images.
Cleaning up and keeping the plan tidy
Addresses count against your plan, so a suite that creates thousands should not leave them behind. A short retention clears the mail, and deleting finished addresses frees their places. A nightly job that lists addresses with your test prefix and deletes the old ones is a few lines of code and keeps the count steady. The same prefix makes the addresses easy to find in the app with Search addresses.
Which Mailcycle plan fits
Operator, at $15 a month, has 250 addresses, 250,000 messages received a month, API keys and webhooks. Scale, at $19, adds your own domains. Fleet, at $99, suits an organisation with many addresses and a team sharing them. See pricing and the plans and limits docs.
Troubleshooting
A wait times out in the service test
Capture since before you call your endpoint. Check that your service actually sends in the test environment, and that the subject filter matches.
A webhook is rejected
Verify the signature against the raw body, and refuse a timestamp older than five minutes.
The plan shows no room
Delete addresses from finished tests, or lower the retention so they clear sooner.
Related reading
- Mailosaur alternative, for browser end-to-end suites
- Mailtrap alternative and testmail.app alternative
- Ethereal Email alternative, for Node.js services that send with Nodemailer
- Python SDK guide and webhooks guide
- Email MCP server guide
- Receive email tutorials and the SDK pages
Sources and dates
Every MailSlurp statement above was read on 26 and 27 November 2026 from these pages:
| What | Page |
|---|---|
| Plans, prices, limits, inbox and sending allowances | https://app.mailslurp.com/pricing/ |
| Inboxes, types, lifetimes, sending modes | https://www.mailslurp.com/docs/inboxes/ |
| Wait methods and parameters | https://www.mailslurp.com/docs/wait-for/ |
| MCP server | https://www.mailslurp.com/docs/mcp/ |
| Custom domains | https://www.mailslurp.com/docs/custom-domains/ |
Mailcycle figures come from https://mailcycle.email/pricing/ and https://docs.mailcycle.email/concepts/plans-and-limits/.
FAQ
What is a good MailSlurp alternative for backend tests?
Mailcycle, if you want addresses by API, a wait call that returns the decrypted message, and webhooks for services that react to mail. SDKs exist in nine languages, including Python for pytest suites.
How much does Mailcycle cost compared with MailSlurp?
On 26 November 2026 MailSlurp's pricing page listed Starter at $19.99, Pro at $69 and Growth at $199 a month. Mailcycle's API keys and webhooks start on the Operator plan at $15 a month, and custom domains start on Scale at $19 a month. The plans measure different things, so compare the limits in the table, not only the price.
Can I bring my own domain?
Yes. Custom domains start on the Mailcycle Scale plan, with 10 domains included, and Fleet includes 50. MailSlurp's pricing page lists a domain as an add-on on Starter and Pro and one included on Growth.
What replaces waitForLatestEmail?
messages.waitFor in TypeScript, or messages.wait_for in Python. Pass the address id, an optional subject or sender, and a timeout.
What is the difference between a temporary and a permanent inbox here?
In Mailcycle every address has a retention you choose, from 24 hours to 90 days. A short retention suits test mail, and a longer one suits an address you keep.
How do I test a sign-up code with Mailcycle?
Create an address, submit it in your sign-up form, then call waitFor and read the code from the message text. The Playwright tutorial builds the whole flow.
Can my service react to incoming mail without polling?
Yes. A signed message.received webhook reaches your HTTPS endpoint, with retries, and each SDK includes the signature check.
Does Mailcycle have an MCP server?
Yes. mailcycle-mcp runs on your own machine and works with Claude Desktop, Cursor, Codex, VS Code or any other MCP client.
Receive email in code
- AgentMail Alternative for AI Agent Inboxes (AgentMail alternative)
- CloudMailin Alternative: Inbound Email to Rails With an Address per API Call (CloudMailin alternative)
- Mailgun Inbound Routes Alternative: Route Mail by Address, Not Regex (Mailgun Routes alternative)
- Mailosaur Alternative for Email Testing and Test Inboxes (Mailosaur alternative)
- Mailparser and Parseur Alternative: Incoming Email as JSON on a Webhook (Mailparser and Parseur alternative)
- Mailtrap Alternative for Email Testing and Test Inboxes (Mailtrap alternative)
- Postmark Inbound Alternative: Addresses by API, Signed Webhooks (Postmark inbound alternative)
- Resend Inbound Alternative: An Address per API Call, Signed Events (Resend inbound alternative)
- SendGrid Inbound Parse Alternative: Inbound Email by API Call (SendGrid Inbound Parse alternative)
- Testmail.app Alternative for Email Testing and Test Inboxes (Testmail.app alternative)
- Test Email Flows on Real Devices with Appium: Read Sign-Up Codes in Python (Appium)
- How to Give a Browser Use Agent an Email Address and Let It Read Its Own Verification Code (Browser Use sign-ups)
- How to Receive Email in C#: Read the Inbox, Save Attachments and Get New Mail Pushed (C# / .NET)
- How to Test Email Verification in Cypress: Receive Sign-Up Codes with cy.task (Cypress)
- Ethereal Email Alternative: Test Nodemailer Emails with an Address per Test (Ethereal Email alternative)
- Golang Receive Email: How to Receive and Read Email in Go (Go)
- How to Read Email in Java: Read the Inbox, Save Attachments and Receive Mail in Spring Boot (Java)
- How to Receive Email in PHP with an Email API: Read the Inbox, Save Attachments and Handle Webhooks (PHP / Laravel)
- How to Receive Email in Python: Read the Inbox, Save Attachments and Get New Mail Pushed (Python)
- Receive Email in Ruby and Rails: Read the Inbox, Save Attachments and Handle Webhooks (Ruby)
- How to Receive Email in Rust: Read the Inbox, Save Attachments and Handle Webhooks in Axum (Rust)
- Add Inbound Email to Your SaaS: Support Intake and Reply-by-Email (SaaS support)
- How to Verify Email in Selenium Tests: Read Sign-Up Codes with Python and pytest (Selenium)
- How to Handle Email Verification in a Stagehand Browser Agent: Create an Address, Wait for the Code, Delete It (Stagehand sign-ups)
- How to Receive Email in Swift: Read the Inbox, Save Attachments and Handle Vapor Webhooks (Swift)
- Test Accounts for Security Testing: a Separate Email Address per Program (Test accounts for security testing)
- How to Automate Email Verification in Tests with Playwright: OTP Codes, Magic Links and Password Resets (Testing email verification)
- How to Receive Email in Node.js: Read the Inbox, Save Attachments and Handle Webhooks (TypeScript / Node.js)
- How to Receive Email with a Webhook: Inbound Email to Your HTTP Endpoint (Webhooks)