> For the complete documentation index, see [llms.txt](https://docs.mailtrap.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mailtrap.io/inbound-email/managing-inbound-emails-in-the-ui.md).

# Managing Inbound Emails in the UI

In this article, you'll learn how to create and manage inbound inboxes, view email threads, set up webhooks, and configure auto-forwarding rules directly from the Mailtrap web interface.

While all Inbound Email features are available via the [Inbound API](https://docs.mailtrap.io/developers/inbound/inboxes), the Mailtrap UI provides a visual workspace to organize inboxes, view incoming messages and attachments, reply or forward in-thread, monitor delivery statuses, and create auto-forwarding rules.

### How it works

Each inbox has its own address, which can be:

* **Mailtrap-hosted** – A generated address under `@inbound-mailtrap.io`. No DNS setup is needed.
* **Custom domain** – Receives email sent to any address under your domain (`*@your-domain.com`), once the domain’s MX record points to Mailtrap.

When an email arrives, Mailtrap accepts it on your behalf, parses it into structured JSON, and groups it with related messages into a thread. From there, you can:

* **View and act on it in the UI** – Open the thread, preview attachments, and reply or forward from the inbox address.
* **Get notified by webhook** – Have your app or AI agent notified the moment a new email arrives.
* **Forward it automatically** – Send matching emails to other addresses with auto-forwarding rules.

#### Step 1. Create an inbound inbox

* Navigate to the **Inbound** tab and click **Create Your First Inbox**.

<div align="left" data-with-frame="true"><img src="https://1476453098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS3xyr7ba7aGO19rc8dSK%2Fuploads%2FPadr776ADlrPYUSqSTRp%2FPasted%20image%202026-11-25%2007.08.29.png?alt=media&amp;token=280521e2-8820-4d73-b262-e44f583f052d" alt="" height="349" width="624"></div>

* Enter an **Inbox name**, choose the **Domain**, and hit **Create**:

<div align="left" data-with-frame="true"><img src="https://1476453098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS3xyr7ba7aGO19rc8dSK%2Fuploads%2FG297iizmeuptCbBRO321%2FPasted%20image%202026-11-25%2007.08.35.png?alt=media&amp;token=359de1f0-4f18-454a-acc8-c7ad8fcc1d71" alt="" height="349" width="624"></div>

* **Mailtrap-hosted (inbound-mailtrap.io)**: Generates an instant address (for example, `test-demo-5-526ee427@inbound-mailtrap.io`) with no DNS setup required.

{% hint style="info" %}
Mailtrap-hosted inboxes (`@inbound-mailtrap.io`) have a lifetime limit of 20 replies per inbox, and this limit does not reset. To send unlimited replies or use custom aliases like `support@` or `invoices@`, use a custom domain.
{% endhint %}

* **Custom domain (catch-all)**: Select one of your verified sending domains or subdomains to receive emails sent to any address under that domain (`*@your-domain.com`).

The first inbox you create will be automatically placed inside a new folder. Folders help you categorize and group inbound inboxes by project, team, or workflow (similar to [Sandbox projects](https://mailtrap.io/sandboxes/projects)).&#x20;

<div align="left" data-with-frame="true"><img src="https://1476453098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS3xyr7ba7aGO19rc8dSK%2Fuploads%2FYZQyZtxpUp7fPj5H6On0%2FPasted%20image%202026-11-25%2007.08.38.png?alt=media&amp;token=f1f60d70-9edd-40db-8806-8b84e3ea3bfc" alt="" height="103" width="624"></div>

If you open an inbox, you can see the:

1. The inbox where emails you receive will show up
2. Automatically generated inbound inbox address
3. Tools you can connect it with (e.g., Mailtrap CLI, MCP, Zapier, n8n, etc.)
4. Code samples you can use to add inbound functionality to your app

<div align="left" data-with-frame="true"><img src="https://1476453098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS3xyr7ba7aGO19rc8dSK%2Fuploads%2FpccbjdasqO6jcjO5kq3E%2FPasted%20image%202026-11-25%2007.08.40.png?alt=media&amp;token=8bb19cec-07d6-47c9-b26e-b24ba22de1e1" alt="" height="348" width="624"></div>

#### Step 2. View, reply, and forward messages

When you receive an email in your inbound inbox, you can:

* Use the toolbar on any message to **Reply**, **Forward**, **Download** the raw message, or **Delete** it.
* **Preview or download incoming files**, (such as PDFs or images) which appear directly inside the message pane.

<div align="left" data-with-frame="true"><img src="https://1476453098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS3xyr7ba7aGO19rc8dSK%2Fuploads%2FPmLWCPVJh8zd13phWvW5%2FPasted%20image%202026-11-25%2007.08.46.png?alt=media&amp;token=b4e23d07-2405-4a9c-8462-2d3bce5e7336" alt="" height="203" width="624"></div>

* **Replies and forwards** belonging to the same conversation are automatically grouped into a single thread with a message counter.
* **Real-time delivery badges** (such as **Delivered** or **Bounced**) are also displayed.&#x20;

<div align="left" data-with-frame="true"><img src="https://1476453098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS3xyr7ba7aGO19rc8dSK%2Fuploads%2FGJ6FGq7z44VbIF6m3vt8%2FPasted%20image%202026-11-25%2007.08.49.png?alt=media&amp;token=6ab055cd-c6ba-49ca-9351-eb1ccc513a51" alt="" height="203" width="624"></div>

* If you click the status link, you will jump straight to **Email Logs** for full event details and headers.

<div align="left" data-with-frame="true"><img src="https://1476453098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS3xyr7ba7aGO19rc8dSK%2Fuploads%2FXLYucSY9f88sQ1MrYYeu%2FPasted%20image%202026-11-25%2007.08.52.png?alt=media&amp;token=2efca119-038f-4f07-be4a-5c0016b49e02" alt="" height="235" width="624"></div>

#### Step 3. Set up webhooks

Webhooks notify your application or AI agent the moment a new email arrives.

* Open your inbound inbox, go to the **Webhooks** tab and hit **Set Up in Webhooks**.

<div align="left" data-with-frame="true"><img src="https://1476453098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS3xyr7ba7aGO19rc8dSK%2Fuploads%2FHY7y2VGt26Wxhkprswle%2FPasted%20image%202026-11-25%2007.08.58.png?alt=media&amp;token=4759e311-eb40-4087-ae8d-a70ece1abca3" alt="" height="235" width="624"></div>

You will be taken to the **Webhooks** configuration page with **Inbound Inboxes** and your specific inbox pre-selected.

* Paste your destination **Webhook URL** and click **Save**.

<div align="left" data-with-frame="true"><img src="https://1476453098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS3xyr7ba7aGO19rc8dSK%2Fuploads%2Fb4n2ylkKzJD1JHRFblOl%2FPasted%20image%202026-11-25%2007.09.00.png?alt=media&amp;token=7aea4062-4af7-43d0-9f1d-9539b5eaf626" alt="" height="349" width="624"></div>

Once you receive a message in your Inbound Inbox, you should see the following output from your webhook:

<div align="left" data-with-frame="true"><img src="https://1476453098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS3xyr7ba7aGO19rc8dSK%2Fuploads%2F9FbGqRzF99QoJxXCavrv%2FPasted%20image%202026-11-25%2007.09.06.png?alt=media&amp;token=e7115d92-c3c6-4833-8d84-ba8942a5b8bd" alt="" height="252" width="624"></div>

**Note**: Webhook payloads contain event metadata only (such as `event`, `message_id`, `inbox_id`, `from`, and `timestamp`). To retrieve the full parsed email body or attachments, fetch the message using the **Messages API** (`GET /api/inbound/inboxes/{inbox_id}/messages/{id}`) or view it in the UI.

### Step 4. Configure Forward rules

**Inbound Auto-Forwarding rules** automatically route matching emails to external addresses (for example, forwarding `support@` to your helpdesk or `invoices@` to your accounting team) while preserving the full thread in Mailtrap.

* Open your inbox, select the **Forward Rules** tab, and click **Create Rule**.

<div align="left" data-with-frame="true"><img src="https://1476453098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS3xyr7ba7aGO19rc8dSK%2Fuploads%2FW76L9WbBphf2yBGwlGXA%2FPasted%20image%202026-11-25%2007.09.09.png?alt=media&amp;token=55ebf96f-4f47-4d21-a566-4b988c6fcd79" alt="" height="211" width="624"></div>

* Enter a unique rule **Name**, and click **Create**.

<div align="left" data-with-frame="true"><img src="https://1476453098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS3xyr7ba7aGO19rc8dSK%2Fuploads%2F5WtQUQNwSXl34uPxIRVe%2FPasted%20image%202026-11-25%2007.09.11.png?alt=media&amp;token=af0c534f-a216-434d-bc15-bc0db27e9bd2" alt="" height="257" width="624"></div>

* Under Conditions, define what incoming messages must match:

| **Field**     | **What it matches**                                                                 | **Available operators**                                                            |
| ------------- | ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| **Sender**    | The sender's email address (`From`)                                                 | `equal`, `not_equal`, `contains`, `starts_with`, `ends_with`                       |
| **Recipient** | The recipient address (`To` or `Cc`) – ideal for catch-all custom domains           | `equal`, `not_equal`, `contains`, `starts_with`, `ends_with`                       |
| **Header**    | Any email header specified by Header Key (e.g., `Subject` or custom system headers) | `equal`, `not_equal`, `contains`, `starts_with`, `ends_with`, `empty`, `not_empty` |

* Under **Destination**, enter one or more recipient email addresses, and click **Save**.

<div align="left" data-with-frame="true"><img src="https://1476453098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS3xyr7ba7aGO19rc8dSK%2Fuploads%2FUBf7gyEUgysH8BZceFm1%2FPasted%20image%202026-11-25%2007.09.14.png?alt=media&amp;token=2cb15f41-b999-46f1-8d5f-7ea6bb18468b" alt=""></div>

Once you create an Auto-Forwarding rule, you can see it under the **Forward Rules** tab.&#x20;

<div align="left" data-with-frame="true"><img src="https://1476453098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS3xyr7ba7aGO19rc8dSK%2Fuploads%2FhHTG48tH2x6ctQHmgLxL%2FPasted%20image%202026-11-25%2007.09.16.png?alt=media&amp;token=d5c7e67a-90f7-4be3-acfb-054c1e459fc1" alt="" height="191" width="624"></div>

And when an incoming email triggers a rule, Mailtrap displays a **1 rule triggered** banner on the message. Click **View Details** to see which rule matched, check its delivery status, or inspect the forwarded message in **Email Logs**.

<div data-with-frame="true"><img src="https://1476453098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS3xyr7ba7aGO19rc8dSK%2Fuploads%2Fp1gZZv2yxKPE9LWndBgX%2FPasted%20image%202026-11-25%2007.09.19.png?alt=media&amp;token=bc599053-1c21-4a9a-b796-a12f32316c54" alt=""></div>

### Enabling inbound receiving on a custom domain

If you select a custom domain that hasn't been configured for inbound traffic yet, you'll see a prompt stating that the inbox isn't receiving emails yet.&#x20;

<div data-with-frame="true"><img src="https://1476453098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS3xyr7ba7aGO19rc8dSK%2Fuploads%2FWDxiojnRplrKF5G1fIua%2FPasted%20image%202026-11-25%2007.09.22.png?alt=media&amp;token=667ea3f2-14a4-481d-b91b-178e4fae2688" alt=""></div>

To enable the receiving on the domain:

* Click **View Domain Settings** (or go to **Sending Domains** in the left menu and select your domain).

<div data-with-frame="true"><img src="https://1476453098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS3xyr7ba7aGO19rc8dSK%2Fuploads%2F1rrvClKYpVUiS2b0Muos%2FPasted%20image%202026-11-25%2007.09.24.png?alt=media&amp;token=f8418c19-3fc3-4589-b2ec-ccd57c000d09" alt=""></div>

* Open the **Domain Verification** tab.

<div align="left" data-with-frame="true"><img src="https://1476453098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS3xyr7ba7aGO19rc8dSK%2Fuploads%2FyLw972DkSBLCI25Ieh6h%2FPasted%20image%202026-11-25%2007.09.27.png?alt=media&amp;token=9fd2ab76-d9f0-4947-bd2b-7d5759c05394" alt=""></div>

* Toggle **Inbound domain receiving** to **ON**.

<div align="left" data-with-frame="true"><img src="https://1476453098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS3xyr7ba7aGO19rc8dSK%2Fuploads%2FL3wzMb8aMhy9l9e0xYHQ%2FPasted%20image%202026-11-25%2007.09.29.png?alt=media&amp;token=05e7d5f3-a869-4bff-8632-7b8951a39563" alt=""></div>

* Add the displayed **MX record** (`10 inbound.smtp.mailtrap.io`) to your domain provider's DNS settings and click **Verify DNS records**.

Once verified, any message sent to any username at that domain (such as `support@your-domain.com` or `billing@your-domain.com`) routes into your catch-all inbox.

### Limits, retention, and billing

* **Message retention**: Inbound emails follow the same retention period as your **Email Logs** based on your current Mailtrap plan (for example, 30 days). Messages are not stored indefinitely.
* **Plan quota usage**: All incoming emails, in-thread replies, manual forwards, and triggered auto-forwards count toward your monthly **Email Live Sending** (API/SMTP) plan quota.
* **Auto-forwarding limits**: You can create **up to 5 rules per inbox**, with **up to 5 condition**s (combined using `AND` logic) and **5 destinations per rule**. Regex matching and email body filtering are not supported.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mailtrap.io/inbound-email/managing-inbound-emails-in-the-ui.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
