Skip to content

Mailbay for QA and test engineers

Real inboxes for your end to end tests

Every test makes up its own address on your private domain. One API call waits for the email and hands back the code. No inboxes to create, nothing to clean up.

What gets in the way

Sign up, magic link and password reset flows need a real inbox, and a polling loop that is flaky in parallel.

How it goes

  1. 1

    Make up an address

    Anything under your workspace's private domain reaches the Catch-all. No setup per test.

    e2e-3-1760449@k7m3qz.mailbay.email

  2. 2

    Your app sends the email

    Over its normal path, to the address the test typed in.

    Your Acme sign in code

  3. 3

    Wait returns the code

    One long poll, filtered to that exact address, with codes and links extracted.

    codes[0] → 590214

The fixture, in short

The full runnable project, config and CI step are in the Playwright guide.

test("sign up with the emailed code", async ({ page, email }) => {
  await page.goto("/");
  await page.getByLabel("Email").fill(email.address);
  await page.getByRole("button", { name: "Sign up" }).click();

  const { message, codes } = await email.next();
  expect(message.subject).toBe("Your Acme sign in code");
  await page.getByLabel("Code").fill(codes[0]);
});

From the Playwright guide; two of these ran in parallel and passed.

Works with what you use

What you get

  • Parallel safe by design

    Each test waits for mail to its own address, so workers never read each other's email.

  • Codes and links extracted

    4 to 8 digit codes and every link come back with the message.

  • Received mail is free

    Test mail does not count toward the sending allowance. The receiving server allows 300 recipients per 10 minutes per workspace.

  • Test the sending side too

    delivered@, bounced@ and complained@test.mailbay.dev simulate each delivery outcome.

  • Then check real delivery

    Tests prove the right email is sent; the deliverability test checks it would reach the inbox.

    Email deliverability test

Questions

Do I need to create an inbox for every test?

No. Any address under your workspace's private mailbay.email domain reaches the Catch-all, so each test makes up an address and waits for mail to exactly that address.

How long can a test wait for an email?

One wait call blocks for up to 120 seconds. If it times out, Mailbay answers 408 with wait_timeout, and calling wait again is safe.

Does this work with Cypress?

Yes. The calls are plain fetch requests to the API. In Cypress, put them in a cy.task so they run in Node, and call the task from the test.

Want the long version? Read catch-all inboxes for end to end tests and the Mailosaur alternative, or see who else Mailbay is for.

Join the beta

Mailbay is in private beta and free while the beta runs: inboxes, sending, your own domains and MCP. We invite people in small batches and read every note on the form.