Test email address

MailSlurp is a free service for creating test email addresses in code or using an online dashboard.

Creating test email accounts

If you need to test an email process or a piece of software use test email addresses to test with real email accounts. You can create inboxes with MailSlurp that can be controlled in a dashboard or using code in Java, C#, Javascript, Ruby and other programming languages.

test email accounts

Using the dashboard

Sign up and create a free MailSlurp account. Login to the dashboard and click the inboxes button on the sidebar. Create a new inbox:

create test email address

Create email addresses in code

You can use the MailSlurp SDKs to generate inboxes in code or tests. Here is an example in Javascript:

First install the NPM MailSlurp package:

npm install --save mailslurp-client

Then create an inbox. It has an email address and an ID.

const inbox = await mailslurp.createInbox();
// { id: '123', emailAddress: '123@mailslurp.com' }

Then you can send and receive emails in tests or your application:

mailslurp.inboxController.sendEmail(inbox.id, { to: ['test@myapp.com']})

For more information see the developer documentation.