intro

# In automated tests

MailSlurp let's you create real inboxes in tests. These inboxes can have randomly assigned email addresses or specific addresses using custom domains. Inboxes can be disposable or permanent. Any email sent to the inboxes email address will be received by MailSlurp servers and stored in the inbox. You can then fetch emails stored in the inbox whenever you like.

You can also attach webhook listeners, wait until some condition is met, search emails with pattern matching and more. Use MailSlurp to test email related processes in automated integration tests using CypressJS, WebDriver IO, Selenium, Jest and more. Test user sign-up, email verification, lost password resets and anything email related. You can test welcome emails, invoice attachments, HTML spam analysis and more.

dash

The typical integration test uses MailSlurp to create a new disposable inbox with a randomized email address. We use that to sign up a new user. We can then receive a welcome email directly from our tests and extract confirmation codes or validate content. A test might look like this:

it("can sign up");

# In servers and apps

Use a REST API or SDK libraries in Java, Ruby, PHP, Go, C#, Ruby, Javascript, and more. Send templated emails to contact and groups groups. Trigger email in response to events.

// create randomly assigned email addresses instantly
const inbox = await api.createInbox();

// or use custom domains
const customInbox = await api.createInbox("user@mydomain.com");

// send emails in code
await api.sendEmail(inbox.id, { to: ["user@example.com"] });

// receive emails in tests and apps
const email = await api.waitForLatestEmail(inbox.id);

# With an online email client

There is a visual dashboard with team access for sending and receiving emails.

dash