Testing Mailboxes
Introduction
Test mailboxes are essential for your Development, Staging, and QA environments. These mailboxes provide unique SMTP credentials that can be integrated into your application to send emails. All sent emails will be visible in the mailbox but won't be delivered to the recipients.
WARNING
Avoid using test mailboxes in production environments. Emails won't be delivered to recipients and are only visible in the Mailsnag application.
Creating a Test Mailbox
Navigate to the Testing section of the application and click on the New Test Mailbox button.
TIP
Utilize the Simulate Errors and Simulate Delay options to test your application's error handling and retry logic.
Using Test Mailboxes
You can employ testing mailboxes in any application that supports SMTP. Also, testing mailboxes can receive real email to its Inbox Email address.
SMTP
In the Instructions section of the mailbox, find the SMTP host
, port
, and credentials
and configure your application accordingly. Instructions also provide sample code snippets for various languages.
Emails sent by your application will reach the specific mailbox but won't be delivered to actual recipients. No feedback about email address validity will be received from the SMTP server.
TIP
Ensure your application has STARTTLS
encryption enabled when connecting to the SMTP server. Each mailbox has unique credentials, allowing multiple mailboxes for different environments.
Inbox Email
For users on the Startup plan or higher, emails can be sent to the mailbox using its Inbox Email address. This is useful for debugging your application with real emails or for testing with multiple real email addresses.
To enable Inbox Email, set an Inbox Prefix in the mailbox settings. This prefix becomes part of a subdomain for the Inbox Email address. For instance, below mailbox with a test
prefix will have the full inbound email address *@1-test.mailsnag.io
, where *
can be any valid Local Part of the email address.
WARNING
The Inbox Email domain is generated from the mailbox and Inbox Prefix. Make sure you copy the correct domain for the mailbox.
TIP
Quickly view the Inbox Email address by clicking on the Mailbox Stats
button.
Managing Collaborators
In the Settings section, you can add or remove collaborators to your Test Mailboxes.
Collaborators will have specific permissions, including viewing the mailbox, deleting emails, updating mailbox settings, managing collaborators, and deleting the mailbox. Owners have full permissions, developers have most permissions, and viewers have limited permissions.
Permission | View Mailbox | Delete Emails | Update Mailbox Settings | Update Collaborators | Delete Mailbox |
---|---|---|---|---|---|
Owner | ✅ | ✅ | ✅ | ✅ | ✅ |
Developer | ✅ | ✅ | ✅ | ✅ | ❌ |
Viewer | ✅ | ❌ | ❌ | ❌ | ❌ |