Quick start
What is MailSlurp?
MailSlurp is an API platform for building SMS and email applications, automations, and integration tests. With MailSlurp you can create real mailboxes and phone numbers then control them in code, tests, and interactive dashboards.
Accessing MailSlurp
There are many ways to access MailSlurp:
You'll need a free account and API Key.
Features
MailSlurp has many features including:
- Email addresses, custom domains, shared team mailboxes
- Inbound SMS
- Integration testing, reputation management
- Webhooks, forwarding, auto-replies, send and receive rules
- Email capture, email address proxy
Let us cover some main features and get up and running with email and SMS.
Create a free account
Open dashboardAdd emails to your project
MailSlurp works with just about any language or framework.
If you prefer a point and click no-code environment use the dashboard instead.
Select an integration
Select an SDK library to configure MailSlurp in your project. See the examples page for project starters.
- Javascript
- C#
- Go
- Java
- PHP
- Python
- Ruby
- More
Create your first inbox
Create a test mailbox with a randomly assigned email address:
- Javascript
- C#
Loading...
Loading...
To create phone numbers see the TXT/SMS guide. For custom email addresses use domain.
Send a test email
Now test the mailbox by sending an email to it from itself.
- Javascript
- C#
Loading...
Loading...
Use wait methods to receive the email
A unique feature of MailSlurp is the ability to wait for matching emails to arrive in an inbox. Let's do that:
- Javascript
- C#
Loading...
Loading...
If the inbox already contains a matching email it will be returned immediately, otherwise the method will wait until the condition is met. Here we use unreadOnly
to ensure that already existing emails in the inbox are ignored. See the wait methods for more examples or the webhooks guide to receive emails at scale directly to your server while avoiding long-polling
List the emails in an inbox and delete
- Javascript
- C#
Loading...
Loading...
See the inbox guide for more options.
Add phones to your account
SMS based workflows can be configured in MailSlurp by adding phone numbers to your account.
Create a phone number
Phone numbers must be created in the dashboard:
Send a test SMS message
- Javascript
Loading...
Wait for a matching TXT
- Javascript
Loading...
List messages
- Javascript
Loading...
See the phone guide for more options.
Features overview
MailSlurp has many features. These include inbox auto-replies, forwarding rules, routing rule-sets, email masking and more. Let's go over some common use cases.