What is inbound email routing and how to set it up (with examples)

The ability to send emails to customers and users is essential for any company that does business online. There is a lesser-known feature, however, that allows you to optimize that communication and improve the user experience of your app or website.
Processing and forwarding emails with inbound routes is a popular method of sorting and delivering emails to their correct destination. But there’s a lot more that inbound email routing can do, which allows you to improve the user experience of your app or website and optimize internal workflows.
There are several interesting use cases for inbound email processing, but before we get into that, here’s a quick run-through of how it works.
Want to skip right to the part on how to configure inbound routing? Jump forward to the steps.
How inbound email processing works
Inbound email processing involves creating routes, or pipelines, to process incoming email messages in various ways. When an inbound email is received by your Email Service Provider (ESP), it will parse the contents and forward it to the specified destination: an email address or endpoint.
The end result could be as simple as forwarding the inbound message to a specified email address or integrating the message into your app. Or, more complex inbound routes might trigger an event via a webhook or allow users to protect their personal details and communicate anonymously with anonymized email relaying.
Inbound email routing use cases and examples
Inbound routing is about a lot more than just directing emails to different locations. It’s about turning email content into actionable data and utilizing it to improve the user experience and your internal processes. Here are some ways inbound email routing can be implemented for various sectors.
SaaS
1. Automate ticket creation for bug reports
Where there’s software, there are bugs, and the people most likely to encounter them are your users. You can make it easy for them to report issues and streamline the bug reporting process for you and your team by allowing people to create tickets in your project management system (like Jira or Linear) via email.
To do this, you’d simply give your users a dedicated email address for reporting bugs and create an inbound route that parses the content of their email and forwards it to an endpoint that opens a ticket in the system.
2. Create an email to ticket support system
Similar to bug reporting, you can also use inbound routing to integrate customer support requests into your helpdesk system, like HelpScout, Zendesk or Intercom. Newly created tickets can be automatically tagged with categories based on keywords in the forwarded email, so that requests can be filtered to the right team. Or you can allow users to select a category that sends the email to a specific subdomain or endpoint.
This allows you to skip the triage step of ticket creation, so requests can be handled faster and more efficiently. Conversation can be continued through email replies using email threading, so that conversations remain linked in a single thread.
In MailerSend, you can extract the Message-ID from the original email in a thread and add it as the value for the In-Reply-To email header to enable email threads. Check out our guide on email threading.
Here’s an example of inbound email routing used for customer support ticketing from Help Scout.

When the user or agent replies via email, the email will also appear in the Help Scout interface.

3. In-app chat
As well as allowing replies via email, you can also use inbound email processing to facilitate anonymized in-app messaging and chat. When a user wants to send a message to another user, they’ll select the user, which is identified by the ESP from their email address. All personal information, including the email address, is anonymized so that the sent message is received, processed and parsed by the ESP to be forwarded to the recipient within the app.
4. Sync email content/attachments
Inbound routing can also be used to simplify tasks, such as processing and storing email content and attachments. This could be as simple as automatically moving attachments to an online storage account or more complex, for example, processing content and parsing it to the app. This is an example of enabling email-based functionality for end-users to improve the user experience.
An awesome example of this functionality in action can be found in the travel planning and itinerary app, Wanderlog.

When you click Forward email, you’re given an auto-generated email address to forward your confirmation to.

Once your email has been forwarded to the address given, the ESP processes it and sends the message to the webhook URL to be added to the app.

Add list items
Another similar use case would be using inbound email routing to add items to a list. Apps that allow users to create lists, for example, shopping lists or to-do lists, can allow users to add items to the list via email.
To-do list app, Todoist, is a great example of an app that allows users to send or forward emails to create tasks. It generates a unique email address for each project.

It even allows you to set due dates, add labels and set priorities by adding the information to the subject line or email body.

The email is sent and then the content is forwarded to the app to create a new task.

Learn more about transactional email for SaaS.
5. Post and reply to comments and messages
When a user receives a message or comment in your app, you can trigger a transactional email message notification to be delivered to their inbox. Inbound routing allows users to respond to messages and comments by replying to the email.
When an email reply is sent, the ESP will receive, process and parse the email message so that it will be displayed within your app interface as a message or comment reply.
If you’d like to integrate this type of functionality into your app, check out our guide on enabling the use of email replies to post comments or messages.
E-commerce
1. Automate B2B order processing
If you sell wholesale or B2B, you might accept orders via email. A lot of B2B retailers do this, and inbound routing can bridge the gap with automation. You can parse out selected data from the email content or attachment, such as customer ID, product ID, and quantity, and automate the order creation process in your system.
2. Manage customer service emails
Forward inbound customer service emails to your CRM tool, and route messages to the correct teams. You can easily organize messages by the date they are submitted, subject, and email content for more efficient handling of requests.
Digital agencies
1. Automate lead creation
Instead of collecting new lead inquiries in the inbox, you can forward emails sent to a dedicated email address or submitted via form to your lead management tool. You can use data like company size, industry or other keywords to group and prioritize leads.
2. Update performance dashboards
If you regularly receive performance reports for various platforms via email, managing these takes time, especially when you’re dealing with multiple clients. Instead of manually processing the data, you can use inbound routing to extract it from the emails and integrate it into a custom dashboard or even a spreadsheet.
Fintech and banking
1. Manage sensitive document submission
When you’re handling sensitive documents for KYC (Know Your Customer), AML (Anti-Money Laundering), or proof of payment purposes, inbound routing not only helps you make processing them more efficient. It can also help you ensure that the documents are handled securely and in compliance with regulations.
You can configure your inbound routes to parse only the necessary data from the document, validate the completeness of the submission, and then forward it to the necessary system for manual or automated verification. You can then either store the document securely or delete it.
2. Optimize fraud management
Since fraud reports are time-sensitive, they need to be handled as quickly and efficiently as possible—and inbound routing can help with this. Connect a dedicated fraud report email to an inbound route so that when a report is submitted, you can automatically create a new case in your fraud management system. This lets customers easily submit a fraud report via an easy and familiar channel, without needing to dig through your app or website.
3. Automate trade reconciliation
Trade reconciliation in banks and financial institutions is a time-consuming (and often error-prone) task that involves matching confirmations or settlement details across multiple systems or custodians. And a lot of this takes place over email. You can use inbound routing to optimize this process, making it more accurate and streamlined, by processing these emails and documents, automatically cross-checking their contents against internal records, and flagging discrepancies.
Learn more about transactional email for e-commerce, agencies and banking and finance.
Benefits of inbound email routing
As you can see from the use cases and examples above, inbound routing allows you to build a more advanced and efficient email system and provide additional functionality for your service or app. As a result, it can help you to:
1. Save time and resources. Inbound email processing can be used to automatically route messages to specific departments or people, or automate the processing of data and documents. This ensures that your email-triggered workflows are as efficient as possible, without the need for manual sorting and forwarding.
2. Optimize workflows and improve customer communication. Since inbound routing automatically routes messages, it speeds up response times. This allows customer service teams to provide support to users faster, as well as increase their productivity.
3. Allow users to engage in 2-way conversations. By parsing incoming messages to your app, users are able to reply to messages and comments via email, which will then seamlessly appear in your app interface.
4. Maintain privacy for users and employees. Anonymized email relaying allows users to communicate with each other and with team members while keeping their personal details private. What’s more, with privacy-focused data processing, you can use inbound routing for handling sensitive documents in a secure and compliant way.
5. Make your email more flexible and scalable. As a business grows and departments and personnel change, inbound routing makes it easy to adapt to new team structures and policies. You can simply make a few small changes to your inbound routes to keep incoming messages running as usual.
How to implement inbound routing with MailerSend's inbound email API
You can set up multiple inbound routes for each domain you have in your account. Getting started is simple:
1. Go to the Domains page and click Manage for the domain you want to create an inbound route for.
2. In the Inbound route section, click Add an inbound route.
3. Enter a Name to be used to identify the inbound route. Below this, you’ll find your unique inbound email address for this route. This is the email address you want emails to be sent to so that they can be processed and parsed by MailerSend before being forwarded.
If you’d like to use your own domain name for the inbound email address, you can enable Inbound domain forwarding. This will allow you to enter a custom subdomain.
If you choose to use a custom subdomain, you’ll need to add an MX record to your DNS with the value matching your custom inbound email address. You can find out more information about this, as well as inbound domain forwarding, catch filters and priorities in our Inbound routing guide.
4. In the Filter emails section, you’ll select which emails to accept based on the email address of incoming emails. Learn more about the different filters available.
5. Finally, in the Route to section, add the email address/es or endpoint/s you’d like to route inbound mail to.
For parsing email content to your app, you’ll also need to create an API token and set up a webhook URL in your app that can receive JSON payloads and respond with a 500 error status or 200 OK status.
Learn how to set up the posting of comments with email replies.
Create an inbound route via API
To create a new inbound route use the following POST request:
POST https://api.mailersend.com/v1/inbound
The request body will look something like this, where under the forwards parameter, type will equal ‘webhook’ and value will equal your webhook URL.
{
"domain_id":"7nxe3yjmeq28vp0k",
"name":"Test name",
"domain_enabled":true,
"inbound_domain":"test.remotecompany.com",
"inbound_address":"test@inbound.mailersend.net",
"inbound_subdomain":"inbound",
"match_filter":{
"type":"match_all"
},
"catch_filter":{
"type":"catch_recipient",
"filters":[
{
"comparer":"equal",
"value":"test"
}
]
},
"forwards":[
{
"type":"webhook",
"value":"https://www.mailersend.com/hook"
}
]
}
Here's an example in PHP:
use MailerSend\MailerSend;
use MailerSend\Helpers\Builder\Inbound;
use \MailerSend\Helpers\Builder\CatchFilter;
use \MailerSend\Helpers\Builder\MatchFilter;
use \MailerSend\Helpers\Builder\Forward;
use \MailerSend\Helpers\Builder\Filter;
use \MailerSend\Common\Constants;
$mailersend = new MailerSend(['api_key' => 'key']);
$mailersend->inbound->create(
(new Inbound('domainId', 'name', true))
->setInboundDomain('inboundDomain')
->setCatchFilter(
(new CatchFilter(Constants::TYPE_CATCH_RECIPIENT)
->addFilter(new Filter(Constants::COMPARER_EQUAL, 'test@mailersend.com'))))
->setMatchFilter(
(new MatchFilter(Constants::TYPE_MATCH_SENDER))
->addFilter(new Filter(Constants::COMPARER_EQUAL, 'sender@mailersend.com', 'sender')))
->addForward(new Forward(Constants::COMPARER_EQUAL, 'value'))
);
For more information on how to get, update and delete inbound routes, check out our API reference.
The maximum email size for inbound emails is 50MB. File attachments have a limit up to 10MB, which counts towards the total email size.
Make email more efficient with inbound routing
Inbound routing is an impressive tool. While simple email forwarding is its most basic use, there are tons of possibilities when it comes to optimizing your transactional email and customer communication, and advancing your app functionality.
If you’d like to try inbound email processing and explore its capabilities, give MailerSend a go. Our friendly support team is available to answer any questions and help you get started!
Are you using inbound routing? Let us know in the comments about your use case and we might feature it!
