// create mailslurp client
const { MailSlurp } = require('mailslurp-client');
const mailslurp = new MailSlurp({ apiKey: process.env.API_KEY });
// create inboxes
const inbox1 = await mailslurp.createInbox();
const inbox2 = await mailslurp.createInbox();
// send email
await mailslurp.sendEmail(inbox1.id, {
to: [inbox2.emailAddress],
subject: "Test",
body: "<span>Hello 👋</span>",
isHTML: true
})
// receive email using wait methods
const email = await mailslurp.waitForLatestEmail(inbox2.id, 60000, true)
expect(email.body).toContain("Hello")
// list emails in inbox
const emails = await mailslurp.inboxController.getInboxEmailsPaginated({inboxId: inbox2.id})
expect(emails.numberOfElements).toEqual(1)

Email infrastructure for apps, tests, and inbox operations
Create inboxes on demand, receive email and attachments, send through API or SMTP, connect custom domains, and route inbound mail into your application with webhooks, forwarding, and rules.
Trusted by top companies worldwide

Unlimited programmable email accounts
Provision instantly and at scale. Use custom domains, plus-addressing, aliases and Gmail/Outlook connections. Then control from code, tests and dashboards.
Powerful APIs + SDKs
Send and receive emails and attachments from anywhere. Build powerful messaging pipelines and automations using native SDK libraries, REST APIs, SMTP/IMAP and more.
Integrate MailSlurp Seamlessly
Integrate with any framework
Official plugins and SDKs for all major programming languages, frameworks, and test platforms. All functionality available via API or dashboard.

CI/CD Native
MailSlurp fits right into your existing development, testing, and CI/CD workflows. Deploy and iterate with confidence and actionable feedback.
Debug email-driven product flows with browser evidence
Pair MailSlurp inboxes, message IDs, verification links, attachments, and email content with Playwright traces so teams can see exactly where signup, reset, notification, or routing flows changed.

Turn delivered emails into release evidence
After MailSlurp captures the real message, audit links, images, sender authentication, and rendered previews across inbox clients. Keep the final email, message IDs, and preview checks attached to the test run before customers see the workflow.
Packed with features
Advanced APIs and functionality for automations, data extraction, and routing.
Permanent or throwaway
Email accounts on demand as permanent email addresses or dummy mailboxes.
Handles scale and load
Provision millions of email accounts instantly. Process huge email volumes at scale with our cloud-native scalable infrastructure.
Custom domains and aliases
Bring your own domains or use a pool of MailSlurp endings. Leverage aliases, catch-alls and plus-addressing plus precise control.
Connect external accounts
Manage multiple Gmail and Outlook accounts from one interface and utilize MailSlurp's extensive API functionality.
Webhooks and forwarding
Process emails and attachments at scale with resilient webhooks and pattern matching forwarding.
Read the email to webhook guideExtract data with AI and OCR
Use prompt-based or JSON schema definitions to transform emails and attachments into structured data.
Video walkthroughs
Send and receive Gmail from a terminal
Read email in a terminal with IMAP and Telnet
Send and receive email in Python with SMTP and MailSlurp
Send and receive email in Node.js and JavaScript
Global messaging scale
Emails processed
500 million+
Infrastructure that scales.
Mobile networks
20+
Leverage global telecom networks.
Mature platform
10+ years
Stable and dependable.


