Inbound email is email that arrives at your domain or application, as opposed to outbound email that you send. In a mailbox, inbound mail is simply what lands in your inbox. In an application, it means mail that your code receives and acts on: a customer replying to a ticket, a supplier sending an invoice, or a user forwarding a receipt.
How inbound email works
Receiving mail is decided by DNS. When someone writes to help@reply.acme.com, their mail server looks up the MX record for reply.acme.com and delivers the message over SMTP to the host it finds there.
For an app, that host is an inbound email service. It:
- Accepts the message over SMTP.
- Parses the raw MIME into from, to, subject, text, HTML, headers and attachments.
- Notifies your app, usually with a webhook, and stores the message so you can fetch it by API.
Your code then matches the message to a user, ticket or thread and does something with it.
Example
The DNS record that sends a subdomain’s mail to an inbound service:
reply.acme.com. MX 10 inbound-smtp.us-east-1.amazonaws.com.
The webhook your app receives might look like this:
{
"type": "email.received",
"data": {
"id": "b81d...",
"from": "sam@example.com",
"to": ["ticket-4821@reply.acme.com"],
"subject": "Re: Your support request"
}
}
The plus address or id in the to address (ticket-4821) is a common way to know which thread a reply belongs to.
Inbound vs outbound
| Outbound | Inbound | |
|---|---|---|
| Direction | Your app to the world | The world to your app |
| Key DNS | SPF, DKIM, DMARC | MX |
| Your code | Calls an API or SMTP relay | Receives a webhook or polls an API |
Why it matters for app email
Without inbound handling, every “reply to this email” goes to a no-reply address or a shared mailbox nobody reads. Receiving mail in code lets users answer notifications naturally and lets you process documents that only arrive by email.
Common mistakes
- Changing the MX of your main domain and cutting off your team’s mailboxes. Use a dedicated subdomain.
- Trusting the From header. It can be forged. Check the authentication results and match replies on a token you generated.
- Not verifying webhook signatures, so anyone can post fake “received” events to your endpoint.
- Ignoring auto-replies and bounces that arrive at the same address, which can create loops.
How Mailcandor handles it
With Mailcandor inbound email, you point a domain’s MX at inbound-smtp.us-east-1.amazonaws.com; each message fires email.received and is readable at GET /v1/emails/receiving, on every plan.