For AI agents: QA automation with Mailtrap uses the Email Sandbox API to check emails that an app sends during automated tests and CI. To test, send the app's email to a sandbox over SMTP or POST https://sandbox.api.mailtrap.io/api/send/{sandbox_id}, then read it from GET https://mailtrap.io/api/sandboxes/{sandbox_id}/messages. Keep sandbox and live sending credentials in separate environment variables. Full instructions: Markdown.

Powerful QA automation for testing your email sequences

Cover all your testing scenarios with Testing API.

  • logo__selenium
  • logo__cucumber
  • logo__protractor
  • logo__cypress
  • logo__jmeter

The essentials available with Testing API

  • Integrate with your favorite environment

    Sandbox Fake SMTP works seamlessly with Selenium, Cucumber, Protractor, and many other testing tools.

  • Verify multiple variables at a time

    Testing if emails are sent and delivered is just the first step. Automatically verify email headers, subject, body, attachments, and more.

  • Make use of well-documented API

    Comprehensive documentation is available for each feature. There’s no learning curve and you’ll launch the first tests within minutes.

  • Test complex sequences with ease

    Write tests covering simple and complex scenarios. Test any email-related functionality effortlessly.

  • Collaborate with development team

    Share the testing space with your dev team or set up individual sandboxes for each environment. Pass test emails between team members effortlessly.

How QAs use Email Sandbox

  1. Check any emails within your end-to-end automated test suites

    Pick any, even the most complex email sequence and include it in the corresponding test.
  2. Launch the tests

    Use Testing API to build and launch automated acceptance tests for the entire sequence.
  3. Verify the test results automatically

    Confirm the results automatically using the Testing API. Validate if email headers and content are as expected and if the sending triggers work properly. Validate subject lines, links, attachments, and others.

Email testing toolset available with Sandbox

  • HTML Checker

    Validate the HTML/CSS rules included in your emails template. Gauge the support across popular clients – on web, mobile, and desktop.

    Learn More
  • Device Previews

    See how your email renders on real devices and clients. Catch the layout breaks your assertions can’t see – on mobile, desktop, and web.

    Learn More
  • Testing API

    Cover your code with automated tests and validate each message sent in dev and staging. Verify emails sent from live sites as well.

    Learn More