Test email account

fake email generator

If you need unique random email addresses for any reason you probably want to use test email accounts. MailSlurp is a free service for creating real email accounts in code, tests, or using a dashboard UI.

Create test email addresses

You can generate test email accounts on demand with API services like MailSlurp. MailSlurp let’s you create real, random email addresses from code then send and receive real emails. It supports many programming languages.

MailSlurp is like a fake email account for testing but it let’s you do more. You can create as many email addresses as you like and then test send and receive email from them from code via REST API or SDK.

test email accounts

How to test emails

Email testing is a common requirement for many modern apps. To test your code with fake email accounts:

test email accounts

Ways to access test emails

MailSlurp has a powerful online dashboard with team access. It also has an extensive email REST API and SDK clients.

Example
Language
// install package with `npm install --save mailslurp-client`
import { MailSlurp } from "mailslurp-client"

// instantiate a client with API KEY
const mailslurp = new MailSlurp({ apiKey: 'your-api-key' })

// create an inbox with a random email address ending in @mailslurp.com
const { emailAddress, id } = await mailslurp.createInbox()
expect(emailAddress).toContain("@mailslurp.com")

// for full control over inbox email addresses use a custom domain
const customInbox = await mailslurp.createInbox("test@mydomain.com")

Try it out

You can try MailSlurp for free. Create an account to use test email accounts today.