Disposable Email API Service

MailSlurp is an email service that provides real, permanent or disposable email addresses on demand. It has a simple REST API and developer toolkits in several major languages. It also includes an online dashboard for manage inboxes and preview emails and attachments.

Create real email addresses on demand in code and online

MailSlurp lets you create unlimited disposable email addresses using our disposable email api service. MailSlurp provides free REST APIs and official clients in over 10 programming languages to let you create real email addresses programmatically or manually using the disposable email api dashboard.

Create inboxes using code

Using the official MailSlurp javascript client you can create test email accounts in tests.

Getting started

Install Mailslurp’s Javascript client or use one of the official MailSlurp clients in your language of preference.

npm install --save mailslurp-client

Configure the client using your API key (you can find your API key by logging into the dashboard).

const MailSlurp = require('mailslurp-client').default;
const mailslurp = new MailSlurp({
  apiKey: process.env.API_KEY ?? 'your-api-key',
});

Then you can create an inbox using the create inbox method.

const inbox = await mailslurp.createInbox();

console.log(inbox);

More examples

You can find more examples of using the disposable email api service in the getting started guide or inbox creating tutorial.