MailSlurp logo

Email and SMS testing. From signup to signed in.

Give your automated tests real inboxes and phone numbers. Receive verification codes, follow magic links and check password resets in Playwright, Cypress or your own test suite.

Test terminal showing passing and failing Playwright tests beside a blue email envelope and SMS phone

Trusted by teams at

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

Unlimited unique email accounts for every test.

Create a unique email address for every test, worker or customer journey. Receive real messages in separate inboxes, without shared Gmail accounts or a mail server to maintain.

Keep an inbox for repeated checks or set an expiry to stop it receiving new mail. Use the dashboard to inspect a failure, and delete the inbox and its retained messages through your test teardown when they are no longer needed.

Explore test inboxes
Emails routed into three separate inbox trays labelled test-1, test-2 and test-3
Playwright, Cypress and Selenium alongside TypeScript, Python and Java SDK logos

Works with all test platforms

Bring MailSlurp into Playwright, Cypress, Selenium or your own suite. Use official SDKs in your language or call the REST API from any test platform.

Find your SDK
An open email with an example six-digit verification code

Powerful test functionality

Wait for the email that matches your sender, subject or recipient. Extract OTP codes and links, then assert exactly what your application sent.

GitHub, GitLab, Azure DevOps, Docker and Jenkins logos for automated CI tests

No more flaky email tests in CI

Replace fixed sleeps with waits that finish when the matching email arrives. Isolate inboxes for parallel runs and fail clearly when a message misses its timeout.

See a matching email test

How it works

Create an inbox, trigger your app's email and wait for the message that matches your test. Check the content, extract an OTP or follow a magic link, then assert the result in your test suite.

Works with any test framework, including Playwright, Cypress, Selenium and JUnit. Use an SDK or the REST API to bring the same message checks into your existing suite.

Build your first email test

Smart content matching and extraction

Find the message your test needs, even when subjects, wording or layouts change. Match by sender, subject or recipient, or use AI to identify a verification email by its meaning.

Extract one-time codes, links and structured values from the matched email. Validate the result, then pass it back to your test to finish signup, reset a password or check an order confirmation.

Explore matching and extraction
AI scanning a verification email to identify the code 482913

No-code team testing dashboards.

Give QA and developers a shared place to inspect the messages your application sends. Create inboxes, read email and SMS, and investigate failed checks in your browser.

Let teammates review the same received message without forwarding it or sharing a login. Individual accounts, permissions and separate environments keep access under your control.

Explore team inboxes
MailSlurp's dashboard showing a received email with preview, HTML, raw SMTP and header inspection controls
HTML and .eml email documents beside a blue file transfer symbol

Inspect emails and attachments

Read the delivered HTML, text and headers. Preview and download attachments to check the receipts, reports and files your application sends.

Explore attachments
A shield and padlock protecting access to email accounts

Fine grained permissions

Decide who can read and reply to messages, manage inboxes or administer the team. Give each person the access their work requires.

Explore access controls
Separate application windows labeled Dev, Staging and Production

Separate environments

Keep development, staging and production resources apart. Grant teammates access to the environments they need for each stage of testing.

Explore environments

Finish the journey your customer starts.

A signup test should reach the signed-in screen. Receive the actual confirmation email, extract its link or code, and continue in the browser. Test password resets, invitations and passwordless login the same way.

Combine email and SMS in one suite to cover multi-factor authentication and recovery paths before a release.

Explore authentication testing
An open email displaying an example one-time verification code

Email OTP and magic links

Read the delivered message, extract a one-time code or URL, and complete the verification step in your test.

Mobile phones representing SMS verification

SMS verification and MFA

Add a dedicated phone number to test SMS codes, second-factor challenges and phone-based account recovery.

Explore SMS testing
Repeated email checks

Repeatable release checks

Run the same checks after each change. Retain message IDs with failed tests so your team can investigate what arrived.

Fits the tests you already write.

Keep your existing Playwright, Cypress, Selenium, JUnit, Postman or Vitest tests. MailSlurp supplies the inboxes, numbers and message APIs; your framework controls the browser, API requests and assertions.

Use official SDKs for JavaScript, TypeScript, Python, Java, C#, PHP and more, or call the REST API directly.

Find your SDK

Watch real email tests, step by step.

Follow @MailSlurp tutorials for Playwright, Cypress, Selenium and API tests. See how to receive verification codes, follow password reset links and complete signup flows.

Selected tutorial: Testing Email Confirmation Codes with Playwright and MailSlurp with throwaway mailboxes

See Youtube channel

Questions about automated email and SMS testing

What is the difference between email integration and end-to-end testing?

An integration test can call your signup API, receive the resulting email and submit its verification code to your application API. A browser end-to-end test also exercises the form and signed-in session. MailSlurp supplies the real inbox and received message for both; your assertions prove that the account is verified or the password reset succeeds. Follow an email test from request to final assertion.

How can I extract an email OTP inside a Cypress test?

Create a MailSlurp inbox for the Cypress test, submit its address through your signup or login flow, then wait for the matching message through the MailSlurp API. Extract the OTP with a pattern, enter it in the browser, and keep the received email with the test result when a failure needs investigation. Read the Cypress email testing guide.

How do I test signup emails in Playwright without shared Gmail?

Provision a fresh MailSlurp inbox in the Playwright test or worker fixture and use that address during signup. Wait for the real delivered email, validate its verification link, and finish the browser journey without shared Gmail credentials or messages left by another run. Delete the inbox and application test user in teardown. Read the Playwright email testing guide.

How do I create an isolated inbox for every automated test run?

Call the MailSlurp inbox API during test setup and store the new inbox ID and email address with that run. Create one inbox per worker or scenario, apply an expiry when appropriate, and wait by inbox ID so parallel builds never read one another's messages. Read the inbox creation guide.

Can I use MailSlurp with Selenium, JUnit, Postman or other test frameworks?

Yes. Use an official MailSlurp SDK or call the REST API from your existing tests. Your framework runs the browser or API requests and makes the assertions; MailSlurp provides the inboxes, phone numbers and received messages. The same approach works with Playwright, Cypress, Selenium, JUnit, Postman, Vitest and other test runners. Explore test framework integrations.

How do I wait for the right email when a test receives several messages?

Record the request start time, then wait in the test's inbox for a message that matches the expected subject, sender or recipient after that time. Set a bounded timeout. Unread-only filtering can narrow the results, but an unread email can still predate the current request. Assert the matching message's contents before continuing in your application. See how email matching works.

How can I make email tests more reliable in CI?

Replace fixed sleeps with a wait for the expected message, and give each parallel test its own inbox. Set the test runner's timeout longer than the email wait so failures report the missing message clearly. Store the API key in your CI secret store and retain the received message ID when a failed run needs investigation. Troubleshoot email waits and timeouts.

Can I test password resets, invitations and magic links end to end?

Yes. Trigger the flow with a test inbox address, wait for its email and extract the relevant link. Check that the link belongs to your application before opening it in the test browser, then assert the expected account or login state. You can also exercise expired or already-used links and check how your application handles them. Read the verification link testing guide.

Can the same test suite check SMS verification codes and MFA?

Yes. Use a MailSlurp phone number in your application's SMS verification flow, wait for the incoming text and extract the code for your test to submit. Combine email and SMS checks to cover signup, account recovery and multi-factor authentication. Keep each test's expected messages and phone number clearly associated to avoid mixing concurrent verification attempts. Read the SMS testing documentation.

Can QA teammates inspect test messages without writing code?

Yes. Teammates can create inboxes, read received email and SMS, inspect message headers and download attachments in the MailSlurp dashboard. Use the dashboard alongside automated tests to investigate what arrived and review failures together. Individual user accounts, permissions and separate environments let you control access without sharing a login. Explore team inboxes and dashboards.

What can I assert beyond whether an email arrived?

Check the sender, recipients, subject, HTML, text, headers, links and attachment metadata. Download attachments when your test needs to validate a generated receipt, report or other file. Combine those checks with browser assertions to verify both the message your application sent and the next step the customer takes. Read about message and attachment assertions.

Can I check how test emails look on different devices and email clients?

Yes. Add MailSlurp device previews to your QA process to inspect the delivered email across supported clients and devices. Review layout, images, responsive behavior and light or dark appearance alongside your functional assertions. Use Email Audit for content checks such as broken links and missing images, and inbox placement testing when you need to check inbox or spam delivery. Explore device previews.

Make your next signup test a complete one.

Create a free account, receive your first test email and bring the result into your test suite.

Playwright, Cypress, Selenium and k6 testing framework logos