MailSlurp logo

solutions

Email Load Testing with Disposable Inboxes

Bulk email stress testing and automated QA. Receive thousands of emails per second using unique email accounts during load tests.

MailSlurp helps teams load test email and SMS workflows with real inboxes and phone numbers created on demand. Use it when signup spikes, OTP bursts, onboarding campaigns, or high-volume notifications need realistic messaging infrastructure during performance tests.

Features

Email Load Testing Made Simple

Test how your app behaves when messaging volume jumps. Simulate signups, bulk sends, OTP bursts, and notification spikes so you can measure delivery timing, inbox handling, and downstream system behavior before users feel the impact.

Stress-Test Notifications and Onboarding Flows

Run automated checks for signup forms, onboarding emails, and transactional notifications while load is increasing. QA and platform teams can see whether email delivery, receipt, and parsing still behave correctly when throughput rises.

Reliable Email API Testing at Scale

From broadcast-style sends to transactional notifications, MailSlurp helps teams test whether their email API and inbox workflows stay reliable under pressure. Simulate large signup waves or MFA bursts and catch delays, routing problems, and message failures before production traffic exposes them.

Support SRE and release engineering teams

As email and SMS become part of business-critical flows, reliability teams need better evidence than provider dashboards alone. MailSlurp makes it easier to run smoke tests, load checks, and release rehearsals with the same inbox and phone primitives used in message-critical workflows.

Integrate with any framework

MailSlurp disposable email accounts work with any load testing framework as they are based on a powerful REST API methods. These endpoints let you send, receive, and wait for inbound emails during testing in a robust and dependable way.

K6s

MailSlurp has a REST API for create and controlling mailboxes and phone numbers via simple HTTP calls within load tests. You can use these API endpoints to verify emails and sent during K6s load tests like so:

const waitUrl = `https://api.mailslurp.com/waitForLatestEmail?inboxId=${inboxId}&timeout=60000&unreadOnly=true`;
let emailRes = http.get(waitUrl, { headers, timeout });
check(emailRes, {
  'status is 200': (r) => r.status === 200,
  'received email has correct subject': (r) => r.json('subject') === 'test',
  'received email to matches inbox': (r) => r.json('to')[0] === emailAddress,
});

Gatling

Use disposable email accounts in Gatling tests to open emails and test email processes under high load. An example test looks like this:

val scn = scenario("User signup + email received")
  // 1. Create inbox via MailSlurp HTTP API
  .exec(
    http("Create inbox")
      .post("/inboxes")
      .header("x-api-key", MAILSLURP_API_KEY)
      .check(status.is(201))
      .check(jsonPath("$.id").saveAs("inboxId"))
      .check(jsonPath("$.emailAddress").saveAs("emailAddress"))
  )
  // 2. Call signup on our application using the created email address
  .exec(
    http("Sign up with email")
      .post(Static.SIGNUP_URL)
      .formParam("emailAddress", session => session("emailAddress").as[String])
      .check(status.in(200 to 299))
  )
  // 3. Wait for latest email using MailSlurp's wait endpoint
  .exec(
    http("Wait for latest email")
      .get("https://api.mailslurp.com/waitForLatestEmail")
      .queryParam("inboxId", session => session("inboxId").as[String])
      .queryParam("timeout", Static.TIMEOUT_MILLIS)
      .header("x-api-key", MAILSLURP_API_KEY)
      .check(status.is(200))
      .check(jsonPath("$.id").exists)
  )

See our JVM SDK for more information.

JMeter

Integrate dummy email accounts and SMTP test server into Apache JMeter load tests easily via HTTP endpoints. Here you can see a screenshot of a JMeter GUI test:

jmeter jmeter

The resulting JMX (XML) might look like this:

<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="GET /waitForLatestEmail" enabled="true">
  <stringProp name="HTTPSampler.domain">api.mailslurp.com</stringProp>
  <stringProp name="HTTPSampler.protocol">https</stringProp>
  <stringProp name="HTTPSampler.path">/waitForLatestEmail</stringProp>
  <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  <stringProp name="HTTPSampler.method">GET</stringProp>
  <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  <boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
  <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
    <collectionProp name="Arguments.arguments">
      <elementProp name="inboxId" elementType="HTTPArgument">
        <boolProp name="HTTPArgument.always_encode">false</boolProp>
        <stringProp name="Argument.name">inboxId</stringProp>
        <stringProp name="Argument.value">${INBOX_ID}</stringProp>
        <stringProp name="Argument.metadata">=</stringProp>
      </elementProp>
      <elementProp name="timeout" elementType="HTTPArgument">
        <boolProp name="HTTPArgument.always_encode">false</boolProp>
        <stringProp name="Argument.name">timeout</stringProp>
        <stringProp name="Argument.value">60000</stringProp>
        <stringProp name="Argument.metadata">=</stringProp>
      </elementProp>
      <elementProp name="unreadOnly" elementType="HTTPArgument">
        <boolProp name="HTTPArgument.always_encode">false</boolProp>
        <stringProp name="Argument.name">unreadOnly</stringProp>
        <stringProp name="Argument.value">true</stringProp>
        <stringProp name="Argument.metadata">=</stringProp>
      </elementProp>
    </collectionProp>
  </elementProp>
</HTTPSamplerProxy>

For more information see our full JMeter email testing guide or the example Github Repository

Locust

MailSlurp has official python plugins to add email inboxes to your locust tests.

Locust email testing Locust email testing

from locust import HttpUser, task, between
import mailslurp_client

# Load test user sign up and email confirmation
class EmailSignUpLoadTest(HttpUser):
    wait_time = between(1, 5)

    @task
    def sign_up_and_receive_email(self):
        # configure mailslurp client config
        configuration = mailslurp_client.Configuration()
        configuration.api_key["x-api-key"] = MAILSLURP_API_KEY

        with mailslurp_client.ApiClient(configuration) as api_client:
            # create unique email account for a user
            logging.info("Creating unique email account")
            inbox_controller = mailslurp_client.InboxControllerApi(api_client)
            inbox = inbox_controller.create_inbox_with_defaults()

            # submit the email to our test application sign-up url
            logging.info("Posting magic link request for %s", inbox.email_address)
            response = self.client.post(
                "/test-application/magic-link",
                data={"emailAddress": inbox.email_address},
                name="/magic-link"
            )
            response.raise_for_status()

            # wait for email to be sent and received by account
            logging.info("Waiting for email to be received")
            wait_controller = mailslurp_client.WaitForControllerApi(api_client)
            email = wait_controller.wait_for_latest_email(
                inbox_id=inbox.id, timeout=60_000, unread_only=True
            )

            # confirm email has correct information
            logging.info("Received email with subject: %s", email.subject)
            assert email.subject == "Please confirm your email address", "Magic‑link email has subject"