About

MailSlurp is a service for creating unique email inboxes on the fly. It also lets you send and receive emails from these inboxes. It's all done via REST or official API clients.

Use cases

MailSlurp was designed for testing applications that rely on email in some way (for user sign-up, support mail, notifications etc).

MailSlurp should be used in integration and end-to-end tests to test staging or production functionality with real email addresses.

Using unique email addresses in every test means you can end-to-end test crucial application functionality like sign-up, payment and invoicing and verify the results.

Details

Each inbox you create has an email address under the mailslurp.com domain.

For instance creating a new inbox via the API might return a response object as follows:

  • POST /inboxes returns { "id": "1234", "emailAddress": "1234@mailslurp.com" }

If you send an email to 1234@mailslurp.com (with any email provider or even the MailSlurp API) MailSlurp will intercept the message and store in under the inbox with id 1234. You can then fetch the email and its contents via the API.

  • GET /inboxes/1234/emails returns a list of emails in that inbox
  • GET /emails/{email-id} returns the email we want

For API specifications and more examples please see the documentation.

Overall concept

Here is a diagram that illustrates the flow of emails from a sender to your application via the MailSlurp API. How it works

Getting started

To get started sign up for a free account. Once you log in you will see you API Key in the MailSlurp dashboard.

To start interacting with the MailSlurp API see the documentation pages. For a quick start try the official MailSlurp SDK on NPM