Mailosaur Alternative for Email Testing and Test Inboxes

A Mailosaur alternative for end-to-end email tests: one address per test, waitFor in place of messages.get, and plans compared from its pages.

By · · Updated · 12 min read

TypeScript code that waits for a sign-up email with the Mailcycle SDK and reads the 6-digit code

People look for a Mailosaur alternative at different moments. A suite grows and the daily email allowance starts to matter, a team wants test inboxes and AI agent inboxes under one login, or the way tests find their mail no longer fits how the suite is written. This guide is written for the end-to-end tester: it explains how Mailosaur’s model works, how it maps onto Mailcycle, and what a migration of a Playwright or Cypress suite involves.

What we say about Mailosaur below comes from its public pages, read on 26 and 27 November 2026. The pages are listed at the end.

How Mailosaur works for a test author

Mailosaur calls an inbox a server, and the docs say the two terms are interchangeable. Each one has its own domain name, in the format INBOX_ID.mailosaur.net, and any address on that domain reaches it, for example test@abc123.mailosaur.net. For platforms that reject subdomains, the docs describe a fallback form, test.abc123@mailosaur.net, that reaches the same inbox. A test can draw a random address with mailosaur.servers.generateEmailAddress("SERVER_ID").

To read the mail, the Node.js page uses mailosaur.messages.get("SERVER_ID", { sentTo: "anything@SERVER_ID.mailosaur.net" }). The method waits for the first matching email. The criteria are sentTo, sentFrom, subject and body, the default timeout is 10 seconds, and receivedAfter takes a date, with a default look-back of one hour. The message exposes its text and HTML, the links, the codes and the attachments array.

That is a neat model for a team with one project: one server, unlimited addresses on it, and the test looks messages up by recipient.

Why this guide is about a different model

Mailcycle works at the level of the address. A test creates an address, uses it once, waits for the message and deletes the address. There is no shared domain to search, because the address is the inbox. For suites that run in parallel, that gives each test its own inbox without the test having to filter by recipient.

Comparison of the entry plans of Mailosaur and Mailcycle: first paid plan, inbound email allowance, retention and official SDK languages
The first paid plan of each service, from the tables below. Mailosaur figures are from its pricing page.

Mailosaur plans, from its pricing page

Read on 26 November 2026 from https://mailosaur.com/pricing. The page text we could read shows annual-billing prices only, so the monthly-billing prices are not included here.

Plan Price Inbound emails Inboxes Retention Email size
Personal From $20 a month, billed annually From 15,000 a month, based on a daily limit of 500 From 1 3 days 10MB
Core From $50 a month, billed annually From 75,000 a month, based on a daily limit of 2,500 From 5 14 days 25MB
Enterprise Custom Custom From 15 Custom Custom

Core includes 5 seats. The usage-limits page says the email limit is daily and covers mail you receive and mail you send, and that it resets at midnight UTC: https://mailosaur.com/docs/managing-your-account/usage-limits.

Mailcycle plans for testing

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

Mailosaur Mailcycle
First paid plan Personal, from $20 a month billed annually Operator, $15 a month
Inbound email allowance on the first paid plan From 15,000 a month, 500 a day 250,000 a month
Retention 3 days on Personal, 14 on Core 24 hours, 7, 30 or 90 days, your choice per address
Official SDK languages Node.js, Java, Ruby, Python, .NET, PHP, Go Nine, including Rust and Swift, all Apache-2.0
Mail encryption Not compared here Encrypted the moment it arrives, with keys from your recovery phrase

Mailosaur lists a daily email limit that covers mail received and sent. Mailcycle lists addresses held and messages received in a month.

Translating the Mailosaur calls

The mapping is small, and most suites need only a handful of replacements.

In Mailosaur In Mailcycle
A server ID and any address on its domain mc.addresses.create({ prefix: 'e2e', retentionDays: 1 })
servers.generateEmailAddress(serverId) The emailAddress on the address you just created
messages.get(serverId, { sentTo }) mc.messages.waitFor({ inboxId, since })
sentFrom, subject criteria from and subject options on waitFor
timeout option, default 10 seconds timeoutMs, and a rejection with code: 'timeout'
receivedAfter since, which defaults to now
files.getAttachment(id) mc.messages.attachment(message, 0)
Deleting messages mc.addresses.delete(address.id) removes the address and its mail

Two differences deserve a note. since defaults to the moment you call waitFor, so for a reply you are about to trigger, take the time before you submit the form. And because the address is new, there is no older mail for the test to trip over.

A Playwright fixture that gives every test its own address

import { test as base, expect } from '@playwright/test';
import { Mailcycle } from 'mailcycle-sdk';

type Fixtures = { inbox: { id: string; email: string; wait: (subject: string) => Promise<string> } };

export const test = base.extend<Fixtures>({
  inbox: async ({}, use) => {
    const mc = await Mailcycle.withApiKey({
      apiKey: process.env.MAILCYCLE_API_KEY!,
      phrase: process.env.MAILCYCLE_PHRASE!,
    });
    const address = await mc.addresses.create({ prefix: 'pw', retentionDays: 1 });
    await use({
      id: address.id,
      email: address.emailAddress,
      wait: async (subject) => {
        const message = await mc.messages.waitFor({ inboxId: address.id, subject, timeoutMs: 60_000 });
        return message.text;
      },
    });
    await mc.addresses.delete(address.id);
  },
});

A test then reads: fill the form with inbox.email, call await inbox.wait('verify'), match the code and continue. The fixture creates and removes the address, so parallel workers never share one. The full walk-through, with magic links, password resets and Cypress, is in the Playwright tutorial.

Mailosaur’s message object offers codes and links as ready-made fields. In Mailcycle you read message.text or message.html and match what you need. That keeps the parsing visible in your test: a six-digit code is /\b\d{6}\b/, and a magic link is the first https:// URL that contains your path. Each message also has safeHtml, with remote content removed, for any test that renders the body.

Attachments come from mc.messages.attachment(message, 0), which returns the bytes. A message that lists an attachment with stored: false had no body, and fetching it returns 404.

Parallel runs and CI

With one address per test, a suite of two hundred tests running on ten workers does not need a naming scheme. Each worker’s fixture creates its own address and deletes it after. Set retentionDays: 1 so any address a crashed run leaves behind clears itself, and store the API key and recovery phrase as CI secrets. Mail is encrypted the moment it arrives and opened on the machine that runs your tests.

Teams, seats and access

Mailosaur’s Core plan lists 5 seats. Mailcycle counts addresses and messages, and API keys are created per purpose, so a CI job has its own key. Where several people need to read the same addresses in the app, Fleet shares them with up to 25 members, read only or read and send. See Email for agencies for how sharing works.

Move a suite over, step by step

  1. Install mailcycle-sdk and create an API key on the Operator plan or above.
  2. Replace server and address setup with the fixture above.
  3. Replace each messages.get with waitFor, passing inboxId and the subject.
  4. Replace helper calls for codes and links with a regular expression on message.text.
  5. Run the suite once with both services in parallel if you want to compare timings, then remove the Mailosaur client.

For other languages, see the receive email tutorials, the SDK pages and Receive email with a webhook. To give an AI agent its own address, start with the email MCP server guide.

Cypress: the same idea through cy.task

Cypress runs in the browser, so the SDK calls go through cy.task, which runs in Node. Register two tasks in your config, one that creates an address and one that waits for the message, and call them from the spec:

  1. cy.task('createAddress') returns the address and its id.
  2. The spec types the address into the form.
  3. cy.task('waitForMessage', { id, subject }) returns the text.
  4. The spec matches the code and finishes the flow.
  5. cy.task('deleteAddress', id) removes the address in an after hook.

The structure matches the Playwright fixture, and the tutorial has the full code for both runners.

What a good email test checks

A migration is a good moment to tighten what your email tests assert. Beyond “an email arrived”, worthwhile checks are:

  • The right recipient and subject. Filter waitFor by subject so a stray message cannot satisfy the test.
  • The code or link works. Follow the link or enter the code and assert the next page, not only that the text matched.
  • One email, not two. After the wait, list the address’s messages and assert the count, which catches duplicate sends.
  • The attachment is the right file. Fetch it and check its bytes or type.
  • The reply path. If your product accepts replies, send one from the address and assert what your app does with it.

Each flow has a small quirk worth encoding once in a helper.

Password resets

Trigger the reset, wait for the message with the reset subject, and extract the link. Use the link once, then assert that a second use fails, because that is the behaviour users depend on.

The link often expires in minutes. Take since immediately before submitting the form so the wait picks up the new message, and follow the link within the same test so it has not expired.

Team invitations

Create two addresses, one for the inviter and one for the invitee, and assert the invitation arrives at the second. Because each address is its own inbox, there is no cross-talk between them.

Keeping test mail tidy

Every address created in a test has a retention, and 24 hours is a good default for CI. A failed run that never reached teardown leaves an address whose mail clears itself the next day. If you want evidence from a failing run, set a longer retention for that job only, so the messages are there when you investigate. An occasional script that lists addresses with your prefix and deletes the old ones keeps the plan’s place count low.

When a custom domain helps

Staging environments sometimes allow only mail to a known domain. On Scale you can use a domain you own for test addresses, with 10 domains included. See Role addresses on your own domain for the setup steps, which are the same for test mail as for business mail.

Which Mailcycle plan for a test suite

Operator at $15 a month is the starting point, with 250 addresses, 250,000 messages received a month, API keys and webhooks. Choose Scale at $19 a month when you want your own domain, so test mail arrives at an address on a domain your staging environment allow-lists. Fleet suits a QA group that shares addresses between members. See pricing and the plans and limits docs.

Troubleshooting a migrated suite

waitFor times out

Check that since is taken before the action that sends the email, and that the subject filter matches. A rejection with code: 'timeout' means nothing arrived in the window.

The code regex finds nothing

Print message.text once. Some senders put the code only in the HTML part, so match on message.html or strip tags first.

A test leaves addresses behind

Wrap deletion in a finally block or fixture teardown, and keep retention at 24 hours as a safety net.

Sources and dates

Every Mailosaur statement above was read on 26 and 27 November 2026 from these pages:

What Page
Plans, prices, inboxes, retention, email size https://mailosaur.com/pricing
Inboxes, servers, address format https://mailosaur.com/docs/inboxes
Getting a message, criteria, timeout https://mailosaur.com/docs/email-testing/nodejs
Attachments https://mailosaur.com/docs/automation/attachments
Email limits and resets https://mailosaur.com/docs/managing-your-account/usage-limits

Mailcycle figures come from https://mailcycle.email/pricing/ and https://docs.mailcycle.email/concepts/plans-and-limits/.

FAQ

What is a good Mailosaur alternative for end-to-end email tests?

If you want each test to own a fresh address, Mailcycle creates one by API, waits for the message with waitFor, and deletes the address when the test ends. SDKs exist in nine languages.

How does Mailosaur pricing compare with Mailcycle?

On 26 November 2026 Mailosaur's pricing page showed Personal from $20 a month and Core from $50 a month, both billed annually. Mailcycle's API keys and webhooks start on the Operator plan at $15 a month, and Scale is $19 a month. The plans measure different things, so compare the limits in the table, not only the price.

What replaces a Mailosaur server ID in Mailcycle?

An address. Mailosaur tests use any address on a server's own domain. In Mailcycle you create an address per test, or one per suite, and pass its id to waitFor.

What replaces messages.get with sentTo?

messages.waitFor with an inboxId. It resolves with the next message that matches, and you can filter by from and subject too.

How long does Mailcycle keep test emails?

You choose per address: 24 hours, 7, 30 or 90 days, and the default is 7. For tests, 24 hours keeps things tidy.

Can I use Mailcycle with Playwright and Cypress?

Yes. The Playwright tutorial builds a fixture that gives every test its own address, and it includes a Cypress version that runs the SDK calls through cy.task.

How do I read a code or a link from the email?

Read message.text or message.html and match the code or link with a regular expression. The tutorial shows patterns for six-digit codes, magic links and password resets.

Does Mailcycle have an MCP server?

Yes. mailcycle-mcp is on npm and runs on your own machine. It works with Claude Desktop, Cursor, Codex, VS Code or any other MCP client.

Receive email in code