Inbound email routing
Inbound mail processing automates the forwarding of incoming messages to your app or CRM for improved workflows, better customer support ticketing, and email-based functionality.
How inbound email processing works
Inbound emails are received by MailerSend, parsed to remove unnecessary content, and forwarded by webhook as a JSON payload to your endpoint or email address.

Quick & easy setup with the inbound email API
curl -X POST \
https://api.mailersend.com/v1/email \
-H 'Content-Type: application/json' \
-H 'X-Requested-With: XMLHttpRequest' \
-H 'Authorization: Bearer {place your token here without brackets}' \
-d '{
"from": {
"email": "your@email.com"
},
"to": [
{
"email": "your@client.com"
}
],
"subject": "Hello from MailerSend!",
"text": "Greetings from the team, you got this message through MailerSend.",
"html": "Greetings from the team, you got this message through MailerSend."
}'
const Recipient = require("mailersend").Recipient;
const EmailParams = require("mailersend").EmailParams;
const MailerSend = require("mailersend");
const mailersend = new MailerSend({
api_key: "key",
});
const recipients = [new Recipient("your@client.com", "Your Client")];
const emailParams = new EmailParams()
.setFrom("your@email.com")
.setFromName("Your Name")
.setRecipients(recipients)
.setSubject("Subject")
.setHtml("Greetings from the team, you got this message through MailerSend.")
.setText("Greetings from the team, you got this message through MailerSend.");
mailersend.send(emailParams);
use MailerSend\MailerSend;
use MailerSend\Helpers\Builder\Recipient;
use MailerSend\Helpers\Builder\EmailParams;
$mailersend = new MailerSend(['api_key' => 'key']);
$recipients = [
new Recipient('your@client.com', 'Your Client'),
];
$emailParams = (new EmailParams())
->setFrom('your@email.com')
->setFromName('Your Name')
->setRecipients($recipients)
->setSubject('Subject')
->setHtml('Greetings from the team, you got this message through MailerSend.')
->setText('Greetings from the team, you got this message through MailerSend.');
$mailersend->email->send($emailParams);
php artisan make:mail ExampleEmail
Mail::to('you@client.com')->send(new ExampleEmail());
from mailersend import emails
mailer = emails.NewEmail()
mail_body = {}
mail_from = {
"name": "Your Name",
"email": "your@domain.com",
}
recipients = [
{
"name": "Your Client",
"email": "your@client.com",
}
]
mailer.set_mail_from(mail_from, mail_body)
mailer.set_mail_to(recipients, mail_body)
mailer.set_subject("Hello!", mail_body)
mailer.set_html_content("Greetings from the team, you got this message through MailerSend.", mail_body)
mailer.set_plaintext_content("Greetings from the team, you got this message through MailerSend.", mail_body)
mailer.send(mail_body)
require "mailersend-ruby"
# Intialize the email class
ms_email = Mailersend::Email.new
# Add parameters
ms_email.add_recipients("email" => "your@client.com", "name" => "Your Client")
ms_email.add_recipients("email" => "your@client.com", "name" => "Your Client")
ms_email.add_from("email" => "your@domain.com", "name" => "Your Name")
ms_email.add_subject("Hello!")
ms_email.add_text("Greetings from the team, you got this message through MailerSend.")
ms_email.add_html("Greetings from the team, you got this message through MailerSend.")
# Send the email
ms_email.send
package main
import (
"context"
"fmt"
"time"
"github.com/mailersend/mailersend-go"
)
var APIKey string = "Api Key Here"
func main() {
ms := mailersend.NewMailersend(APIKey)
ctx := context.Background()
ctx, cancel := context.WithTimeout(ctx, 5*time.Second)
defer cancel()
subject := "Subject"
text := "Greetings from the team, you got this message through MailerSend."
html := "Greetings from the team, you got this message through MailerSend."
from := mailersend.From{
Name: "Your Name",
Email: "your@email.com",
}
recipients := []mailersend.Recipient{
{
Name: "Your Client",
Email: "your@client.com",
},
}
variables := []mailersend.Variables{
{
Email: "your@client.com",
Substitutions: []mailersend.Substitution{
{
Var: "foo",
Value: "bar",
},
},
},
}
tags := []string{"foo", "bar"}
message := ms.NewMessage()
message.SetFrom(from)
message.SetRecipients(recipients)
message.SetSubject(subject)
message.SetHTML(html)
message.SetText(text)
message.SetSubstitutions(variables)
message.SetTags(tags)
res, _ := ms.Send(ctx, message)
fmt.Printf(res.Header.Get("X-Message-Id"))
}
import com.mailersend.sdk.Email;
import com.mailersend.sdk.MailerSend;
import com.mailersend.sdk.MailerSendResponse;
import com.mailersend.sdk.exceptions.MailerSendException;
public void sendEmail() {
Email email = new Email();
email.setFrom("name", "your email");
email.addRecipient("name", "your@recipient.com");
// you can also add multiple recipients by calling addRecipient again
email.addRecipient("name 2", "your@recipient2.com");
// there's also a recipient object you can use
Recipient recipient = new Recipient("name", "your@recipient3.com");
email.AddRecipient(recipient);
email.setSubject("Email subject");
email.setPlain("This is the text content");
email.setHtml("This is the HTML content
");
MailerSend ms = new MailerSend();
ms.setToken("Your API token");
try {
MailerSendResponse response = ms.emails().send(email);
System.out.println(response.messageId);
} catch (MailerSendException e) {
e.printStackTrace();
}
}

Create conversations
Enable two-way communication so users can converse with support staff, customer service, and each other. Users can respond to tickets, leave comments, and more by replying to transactional emails.

Use branded inbound domains
Ensure brand consistency by using a custom inbound domain or subdomain. Route inbound messages to the right teams with specific domains for sales, support and more.

Implement custom flows with priorities
Create multiple routes for a single subdomain and use prioritization to design advanced custom flows.

Create rule-based email routing
Easily filter messages by email address, domain or headers to create workflow rules that route messages to different endpoints.
Inbound email routing use cases
-
Post comments and messages
Allows users to respond to comments and messages by replying to the notification email. -
Customer support ticketing
Users can respond to customer support tickets via email and their reply will be parsed to the ticketing software. -
Anonymized in-app messaging
Facilitate anonymous in-app chat by routing messages between users while keeping personal information hidden. -
Email-based app/website functionality
Process and parse content from emails to app or website interfaces for itineraries, to-do list items, blog posts and more.





Monitor inbound activity and analytics
Keep tabs on inbound message activity, and use webhooks for real-time notifications about inbound route failures so you can take immediate action.

Award-winning technical support
Our award-winning, human customer support team is always available to help with setting up your account, using advanced features and troubleshooting.
Created for all businesses
Frequently Asked Questions
Why would I need inbound email routing?
Inbound routing enables your users and customers to interact with your app, creating 2-way conversations with customers. They help you streamline communication, making sure you keep track of important messages and they get routed to the correct location.
What is the difference between "Routing to a specific mailbox" and "Routing to a specific domain"?
You can create an inbound route that forwards any incoming messages to a specific mailbox by entering the exact email address. This means the incoming message will be filtered by the recipient and will only be received if the recipient matches the filter, like sales@domain.com. By filtering to a specific domain, like *@domain.com, you allow all emails sent to a domain to be routed and sent out to your email or endpoint.
What is the difference between "forwarding" and "routing" an email?
Email forwarding involves collecting data from one device and sending it to another. Email routing involves moving the data between devices, for example, moving an incoming email through MailerSend to be parsed and sent to your app.
Do emails processed with the inbound route count toward my quota?
Any inbound emails forwarded or posted to your endpoint URL are counted against your monthly usage. One forward is equivalent to one sent email. So, if you have a combination of 4 endpoint URLs and forwarding addresses, it will count as 4 emails against your monthly usage.
Implement inbound email routes now
Take control of email delivery and enhance your customer experience with inbound routing. Try it now—sign up for a Starter plan starting at $28/month for 50,000 emails + more advanced features.
Explore all features
Powerful RESTful API service

Start sending and tracking your emails with our easy API integration process and clean documentation.
Email verification

Verify a single email address or upload an entire email list to verify in bulk.
Webhooks

Get notified of email events to trigger automatic reactions.
Email activity & analytics

View your email activity in real-time to gain insights and make adjustments when needed.
Email inbound processing

Automatically parse incoming emails. Inbound email routes enable MailerSend to receive emails on your behalf, integrating them into your application.
Dynamic email templates

Build one-to-one customer relationships on a mass scale using a single email template.
And much more to deliver, every single time