MailSlurp logo

Disposable email API for reliable automated tests

Create a fresh private inbox for every Playwright, Cypress, QA, or CI run. Receive real emails, extract verification links and OTP codes, and remove shared-mailbox failures from your test suite.

PlaywrightCypressSeleniumPostmanJavaScriptPythonGitHub Actions

Trusted by top companies worldwide

  • Broadcom
  • Scraper
  • Trivago
  • Avast
  • Wolt
  • Panasonic
  • Broadcom
  • Scraper
  • Trivago
  • Avast
  • Wolt
  • Panasonic

Give every test run its own clean inbox

Provision an isolated email address for each test, worker, or customer journey. Signup, password-reset, invitation, and notification emails arrive in the inbox owned by that run, so parallel tests can execute without collisions.

Playwright, Cypress, and Postman test runs creating a fresh MailSlurp inbox

Run tests safely in parallel

Create one address per worker so concurrent signup and recovery tests never consume another run's email.

Wait for the message that matters

Match the sender, subject, unread state, and time window, then inspect delivered files such as YourDelivery PDFs.

Continue the browser journey

Extract the link or code and complete the same signup, login, invitation, or reset flow in the browser.

Connect your agents

Give Claude, ChatGPT, Gemini, Copilot, and your own agent runtime scoped access to real test inboxes through MailSlurp.

MailSlurp

Test the email journeys customers depend on

Use real delivered email to verify the complete application flow, not only whether a template or send call succeeded. Watch a Playwright test create an inbox, trigger the message, and continue the browser journey.

Password reset and magic links

Extract a reset URL or one-time sign-in link and finish the browser journey before it expires.

Transactional notifications

Confirm that order, account, billing, and status events send the correct email to the expected recipient.

Links, content, and attachments

Assert sender, subject, HTML, links, codes, headers, and attachments using the email that actually arrived.

A controlled row of private test emails fading away as retention ends

Keep test inboxes private, controlled, and temporary

MailSlurp gives your team account-owned inboxes. Tag each inbox by environment and test, set its expiry, and add teardown that deletes it after the assertions. Keep the evidence you need before cleanup.

Private inbox ownership

Control inbox access through your MailSlurp account and API credentials rather than a public mailbox URL.

Explicit expiry and cleanup

Schedule inbox expiry, then manage retained messages and explicit deletion as separate cleanup steps.

Evidence when a test fails

Keep the permitted message evidence with your test result before deletion. Store IDs for correlation without putting reset tokens in general logs.

Create, wait, extract, and continue from code

Provision a private inbox for the current test, submit its address through your application, wait for the matching message, and extract the verification link or code. Use MailSlurp from the framework and language your suite already runs.

See disposable email testing in action

Open and verify email in Cypress JavaScript tests

Extract email confirmation codes in Selenium tests

Test email confirmation codes with Playwright

How disposable email testing works

Use a private, API-controlled address to test the real email sent by your application. Each test owns the inbox, the delivered message, and the cleanup policy.

What is a disposable email API?

A disposable email API creates a real email address on demand and gives software access to every message it receives. With MailSlurp, a test can create the address, receive email from your application, read the HTML and text, extract links or OTP codes, inspect attachments, and delete or expire the inbox when the run ends.

How do I create a private inbox for each CI test?

Create a MailSlurp inbox at the start of the test and assign its address to one CI worker or browser session. Use bounded wait methods to receive the expected sender, subject and request window without fixed sleep delays. Set an expiry at creation, then run explicit cleanup after the assertion completes. The test-address guide explains that lifecycle.

How do Playwright, Cypress, and Selenium read email?

Use the MailSlurp client or Cypress plugin to create an inbox before the browser journey, enter its address, and wait for the delivered message. Extract the verification link, magic link, password-reset URL, or OTP code and continue the same test with the Playwright guide, Cypress guide, or Selenium example.

Why use private test inboxes instead of public temp mail?

Public temporary-email sites can reuse addresses and expose mail through a shared web page. MailSlurp inboxes belong to your account, are protected by API credentials, can be tagged to a test or environment, and support explicit retention so parallel tests do not read another run's messages.

Read email in Playwright, Cypress, and Selenium

Create a private disposable inbox inside the test, trigger the customer journey, wait for the delivered message, and continue in the same browser session.

Read a received email in Playwright

Playwright browser test reading a delivered verification email

Use the MailSlurp client with Playwright to create an inbox, match the signup or reset email, extract its link or OTP code, and finish the browser test.

Test received email in Cypress JavaScript

Cypress JavaScript test receiving email in a private inbox

Use the MailSlurp Cypress plugin or JavaScript client to isolate each test inbox, open the delivered email, and assert links, codes, sender, subject, and content.

Verify email and OTP codes in Selenium

Selenium browser test extracting a verification code from email

Create a real test address with the Java, C#, Python, or REST client, receive the confirmation email, and pass the extracted code back to Selenium WebDriver.

Disposable email API questions

Create private test inboxes, receive real delivered messages, and control the complete lifecycle from code.

What is a disposable email API?

A disposable email API creates private email addresses from code for tests and automated workflows. Each inbox can receive real email, wait for a matching message and expose its content through an API. Set an expiry when you create it and add a cleanup step for the end of the test. Read the inbox API documentation.

Can I create a new disposable inbox for every automated test?

Yes. A test can create its own MailSlurp inbox before signup, password reset, invitation, or notification steps. Parallel workers can use separate addresses so messages and assertions never share mailbox state. Explore email integration testing.

How do Playwright and Cypress tests read email?

Create a disposable inbox, enter its address in the browser flow, wait for the delivered email through the MailSlurp API or Cypress plugin, extract the required link or code, and continue the browser test in the same run. Read the Playwright email guide. Read the Cypress email guide.

Can disposable inboxes receive OTP codes and magic links?

Yes. MailSlurp receives the real message sent by your application, then lets the test extract an OTP, confirmation code, magic link, reset URL, sender, subject, headers, body content, and attachment metadata. See authentication testing workflows.

Are MailSlurp disposable inboxes private?

Yes. MailSlurp inboxes are controlled through your account and API credentials. They are designed for private testing and automation rather than public shared-inbox access.

Can disposable inboxes expire automatically?

Yes. Set an expiry when creating the inbox. MailSlurp periodically archives inboxes whose expiry time has passed, closing them to further sending and receiving. Manage retained messages and explicit deletion separately. For a failed test, keep the permitted evidence before cleanup; an ID alone does not preserve deleted content. Compare temporary email lifecycle options.

Does MailSlurp have phone numbers for SMS and OTP testing?

Yes. MailSlurp provides real phone numbers that tests can control through the dashboard and API. Receive SMS messages, verify OTP and MFA flows, and isolate each automated test run alongside disposable email inboxes. Explore programmable phone numbers for SMS testing.

The complete email and SMS toolkit.

Develop and test real messaging flows, preview emails on real devices, protect deliverability, and connect AI agents—all from one platform.

Messages moving from an inbox through desktop and mobile previews to inbox placement results