Receiving Mailboxes
Introduction
Receiving Mailboxes are used for Production
environments. These mailboxes allow you to receive emails on your custom domains. All emails received will be forwarded to your application using a JSON
webhook. This allows you to process emails in your application and store them in your database.
TIP
Receiving Mailboxes unlock a new way for your customers to interact with your application. For example, you can allow your customers to reply to emails sent by your application. Your application can process replies and update the database accordingly.
Creating a Receiving Mailbox
Navigate to the Receiving section of the application and click on the New Receiving Mailbox button.
TIP
Parsed parts of the email are included in the webhook payload by default. In case you also need the actual raw email message, you can check the Include Raw Message option.
Using Receiving Mailboxes
In order to receive emails on your custom domain, you need to configure your DNS records. You can navigate to the Instructions tab of the mailbox to view the required steps and validate your configuration.
Verify Receiving Domain
In order to start using your receiving mailbox, you need to verify your domain. This is done by adding a TXT
record to your domain's DNS records. You can navigate to the Instructions tab of the mailbox to view the required steps and check the verification status.
TIP
You should see green checkmark instead of yellow hourglass icon when the step is successful.
Configure Mail Exchange
In order to receive emails on your custom domain, you need to configure your MX records. You can navigate to the Instructions tab of the mailbox to view the required steps and validate your configuration.
TIP
You should see green checkmark instead of yellow hourglass icon when the step is successful.
Handle Webhook Payloads
When an email is received, a JSON
payload is sent to your application's webhook endpoint. You can send a test payload using the Test Webhook section in the Instructions tab.
WARNING
Make sure to authenticate the webhook requests. You can use the Mailsnag-Signature
and Mailsnag-Signature-Timestamp
headers to verify the request is coming from Mailsnag.
Please reference the API documentation for the sample webhook payload and authentication examples.
Managing Collaborators
In the Settings tab, you can add or remove collaborators to your Receiving Mailbox.
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 | ✅ | ❌ | ❌ | ❌ | ❌ |