Documentation
Receiving email.
Mail sent to an address at your domain arrives in Mailtruss, at your webhook and in the API: support replies, inbound requests, anything people send you.
Set up receiving
- Use a domain you have verified for sending. Receiving on a subdomain such as
in.example.comis the safe choice: the MX record you add replaces any existing MX for that name, and your main domain’s mailboxes keep working. - Turn it on: in the dashboard open the domain, then Configuration, Receive email. Or with the API (below).
- Publish the MX record it shows at your DNS provider: host
in.example.com, priority10, valueinbound-smtp.us-east-1.amazonaws.com. Check MX now on the same page tells you when public DNS points at us. - Send a message to any address at that name. It shows under Received within seconds and is posted to your webhooks as
email.received.
The email.received event
Subscribe an endpoint to email.received under Webhooks. The event is signed and retried like every other. It holds the sender, recipients, subject, threading fields, the attachment list and the authentication results, but not the bodies, so it stays small. Fetch the bodies with the API when you need them.
Reading messages with the API
| Endpoint | Returns |
|---|---|
GET /api/v1/inbound | Received emails, newest first. q searches sender, subject and recipient; thread_id lists one conversation; before pages back. |
GET /api/v1/inbound/:id | The text and HTML bodies, headers, SPF, DKIM and DMARC results, the spam verdict and the attachment list. |
GET /api/v1/inbound/:id/attachments/:attachmentId | One attachment, its bytes as base64 in content. |
GET /api/v1/inbound/:id/raw | The original message exactly as received (message/rfc822), base64. |
DELETE /api/v1/inbound/:id | Deletes the message, its attachments and the original. |
These need a full-access API key. Sending-only keys cannot read received mail.
Replies and threads
When someone replies to an email you sent through Mailtruss, the received message carries reply_to_email_id: the ID of your sent email. Messages in the same conversation share a thread_id, built from the standard In-Reply-To and References headers, so you can show a ticket’s history without parsing headers yourself.
Safety, limits and retention
- Messages flagged as carrying a virus are dropped and never stored. Messages flagged as spam are kept and marked (
spam_verdict: "fail") so you can decide. - The authentication results (
spf,dkim,dmarc) are what the receiving server found. A failed DMARC check means the sender may not be who the From line says; treat such a message with care before acting on it. - Each received message counts as one email toward your monthly plan, like a send. Received mail is never refused for quota: it has already arrived.
- Messages up to 40 MB are accepted, attachments included.
- Received mail is kept for 30 days, then deleted with its attachments and original. Copy anything you need to keep.
- In the dashboard, a message’s HTML is shown in a sandbox with scripts off and remote images blocked until you load them, so opening it does not tell the sender.