Automate Your Email Testing With Mailtrap’s API

Cover your code with tests and validate if emails are sent. Test multiple variables at a time.

Mailtrap API has everything you need to test your emails

Verify hundreds of variables, at once

Complex workflows call for comprehensive solutions. Test any number of unique emails in a matter of seconds.

Inspect unmodified emails

Raw headers are visible for each email you send. Validate each and easily catch any inconsistencies.

Quickly integrate with your CI

Our API works seamlessly with any WebCI and features an extensive documentation. There’s hardly any learning curve.

Run automated, daily checks

Save time by letting API handle the dull checks of your emails. Be the first to know if any issues occur.

Test on any environment, including production

With features such as bcc tracking or individual email per inbox, you can monitor live emails with ease.

Dig into the contents of your emails

Verifying if emails are sent is just the first step. Check their spam score, validate the headers, HTML, and a lot more.

Trusted by more than 600k devs, QAs and managers worldwide

How engineers use Mailtrap

  • Integrate your app with Mailtrap SMTP and API

    Copy the credentials or grab the ready code available in the inbox settings. Send the first email to Mailtrap’s SMTP server.

  • Run a check in your CI

    Use Mailtrap API to validate if an email was indeed sent. Check automatically any other details – headers, attachments, links, etc.

  • Expand your tests

    Set up recurring checks and use API to access other Mailtrap features – spam score, HTML check, bcc tracking, and many others.

From our #BestClientEver

Joshua Anderton

@joshuaanderton
Just signed up for @Mailtrap and I’m loving it. So easy to set up. Provides so much peace of mind. Ahh just love it.
7:38 PM – Jan 13, 2021

DeveloperMitch

@mitchellfinlay
After all these years of web development, how have I only JUST started using @Mailtrap. I had heard about it, but never got round to using it. An awesome way of testing emails.
1:25 PM – Nov 07, 2020

Alessandro Rodi

@coorasse
I love @Mailtrap. It removes all the asshole of configuring email servers in test environments. Great service! Is totally worth your money!
1:15 PM – Oct 20, 2020

Mr. Glass

@MisterGlass
Shout out to @Mailtrap, hands down the best way to handle mail sending in local/test environments.
11:43 PM – May 21, 2020

Rado Georgiev 

@Rado_g
One thing we started using recently is @Mailtrap for our dev & staging environments. We were previously either turning email sending entirely off for staging or running SES + whitelist. Turns out, having a fake SMTP mailbox is great and you can test better with it.
1:32 PM – Jan 06, 2021

Doug Black Jr

@dougblackjr
Can we all agree @Mailtrap is a gift to developers everywhere? It just works SO easily out of the box!!!!
9:45 PM – Aug 11, 2020

All-in-one email testing toolset available with your Mailtrap account

HTML Check

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

Read More

QA Automation

Build automated tests of your email sequences and include them in your testing suite. Verify each component of a message with Mailtrap API.

Read More

Fake SMTP

Test email sending from your project, and view each message sent in your Mailtrap inbox. Never send your test emails to real users.

Read More