Inboxes
MailSlurp inboxes are email addresses. Inboxes can be permanent or disposable. They can have randomly assigned addresses or use custom email domains.
Inboxes are a base entity that can have other features like webhooks, routing rules, forwarding, and SMTP/IMAP access configured using their ID.
Quick links
Inbox overview
Inboxes are email mailboxes that have an ID, email address and other properties.
Loading...Inboxes can send and receive emails and attachments. They can be created and managed using the dashboard or API clients
Creating inboxes
Inboxes can be configured in the MailSlurp dasbhoard or using the API.
The default SDK create action will create an HTTP inbox with a randomly assigned email addresses.
- Javascript
Loading...
You can create more complex examples by passing inbox configuration options.
- Javascript
See inbox creation options.
Loading...
Using custom addresses
To assign a custom email address to an inbox you must use a custom domain. You can use a short email address by with the useShortAddress
option.
- Javascript
Loading...
Plus address aliases
Plus addressing allows you to use +xyz
suffix in the local part of an email address. When sending emails to an inbox you can use +xyz
style aliases to partition received emails by the sub-address alias. See the plus addressing guide for more information.
Virtual inboxes
You can create mail traps using the virtual
flag. This means the inbox will never send out-bound emails. It will instead save a sent message but not send the email to any recipients.
- Javascript
Loading...
Expiry
Inboxes can be made ephemeral using the expiresIn
or expiresAt
properties. All paid plans use permanent inboxes by default.
- Javascript
Loading...
IMAP/SMTP
Inboxes can be accessed via IMAP and SMTP using the access details for the inbox or at the account level.
Loading...
For more information see the IMAP/SMTP guide or mail app config.
All create options
For all inbox creation options see the CreateInboxDto
schema in your integration:
Fetching inboxes
You can list and fetch inboxes using the API.
Listing inboxes
Inbox results are paginated. Pass a starting index and page size to paginate results.
- Javascript
Loading...
Get an inbox by ID
Inboxes can be fetched using their ID.
- Javascript
Loading...
Delete an inbox
You can delete inboxes using the ID.
- Javascript
Loading...
Fetch emails in an inbox
Emails can be fetched for an inbox.
- Javascript
Loading...
Inbox automations
Inboxes are component of many MailSlurp features:
Feature | Description |
---|---|
Webhooks | Trigger actions based on email events |
External connections | Connect inboxes to external email accounts |
Forwarding | Forward emails to other email addresses |
Routing rules | Block and allows emails based on content matching |
Alias proxy | Mask an inbox with a proxy email address |
Auto reply | Send replies to inbound emails |
Mail trap | Capture outbound emails but do not send them |
Custom domains | Use custom email addresses with inboxes |
IMAP/SMTP | Send and receive emails using IMAP and SMTP |
We will cover more email methods on the email page.