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

Wait for the message that matters

Continue the browser journey

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

Transactional notifications

Links, content, and attachments

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 instead of public shared temp-mail addresses. Set an expiry, tag inboxes by environment and test, retain failed-message evidence when needed, and clean up automatically after successful runs.

Private inbox ownership

Explicit expiry and cleanup

Evidence when a test fails

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, or unread message without fixed sleep delays, then apply an expiry or cleanup step after the assertion completes.

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, expose its content through an API, and expire when the workflow is complete. 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 or apply a cleanup policy after the run. You can also retain the inbox or message ID when a failed test needs evidence for debugging. 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.

Give your next test, app, or agent a real inbox.

Start free with real email addresses and phone numbers. Add rendering, deliverability, automation, and team access as you grow.

Email inbox and phone connected to code, a passed test, and an AI agent