> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lettr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Inbound Email Setup

> Configure your domain to receive email with Lettr by adding an inbound domain, setting up MX records, and connecting a webhook endpoint.

Before you can receive emails with Lettr, you need to configure an inbound domain and set up MX records to route incoming mail to Lettr's servers.

## Prerequisites

Before setting up inbound email, ensure you have:

* A verified Lettr account
* Access to your domain's DNS settings
* A webhook endpoint ready to receive inbound email events (recommended)

## Step-by-Step Setup

<Steps>
  <Step title="Add an Inbound Domain">
    Navigate to **Domains** → **Inbound** in your dashboard and click **Add Domain**. Enter the domain or subdomain you want to use for receiving emails.
  </Step>

  <Step title="Configure MX Records">
    Add the provided MX records to your domain's DNS settings. These records tell email servers to route mail to Lettr.
  </Step>

  <Step title="Verify MX Records">
    Click **Verify** in the dashboard to confirm your MX records are properly configured.
  </Step>

  <Step title="Set Up Webhooks">
    Configure a webhook endpoint to receive notifications when emails arrive.
  </Step>
</Steps>

## Adding an Inbound Domain

1. Go to **Domains** → **Inbound**
2. Click **Add Domain**
3. Enter your domain (e.g., `mail.example.com`)
4. Click **Create**

The dashboard will display the MX records you need to add, along with the domain's current status (`unverified` until DNS is configured).

<Note>
  Inbound domain management is available through the Lettr dashboard. There is no public API endpoint for creating or managing inbound domains.
</Note>

## DNS Configuration

Add these MX records to your domain's DNS settings:

| Type | Host/Name        | Priority | Value                   |
| ---- | ---------------- | -------- | ----------------------- |
| MX   | `@` or subdomain | 10       | `rx1.sparkpostmail.com` |
| MX   | `@` or subdomain | 10       | `rx2.sparkpostmail.com` |
| MX   | `@` or subdomain | 10       | `rx3.sparkpostmail.com` |

<Note>
  If you're using a subdomain like `mail.example.com`, set the Host/Name field to `mail` instead of `@`.
</Note>

### Understanding MX Priority

All three MX records use the same priority (10), which provides load balancing:

| Priority | Server                  | Purpose     |
| -------- | ----------------------- | ----------- |
| 10       | `rx1.sparkpostmail.com` | Mail server |
| 10       | `rx2.sparkpostmail.com` | Mail server |
| 10       | `rx3.sparkpostmail.com` | Mail server |

With equal priority, sending servers distribute email across all three servers. If one is unavailable, the others handle delivery automatically.

## Verifying Your Domain

After adding MX records, verify they're properly configured:

1. Go to **Domains** → **Inbound**
2. Find your domain and click **Verify**
3. Wait for the verification to complete

Once verified, the domain's status changes from `unverified` to `valid`, confirming your MX records are correctly configured.

## Domain Status

| Status       | Description                                   |
| ------------ | --------------------------------------------- |
| `valid`      | All MX records found and configured correctly |
| `unverified` | MX records not yet detected or incomplete     |

## Using Subdomains vs Root Domain

We recommend using a subdomain for inbound email:

| Configuration         | Use Case                                |
| --------------------- | --------------------------------------- |
| `mail.example.com`    | General inbound processing              |
| `reply.example.com`   | Reply tracking for transactional emails |
| `support.example.com` | Customer support emails                 |
| `inbound.example.com` | Webhook-triggered workflows             |

<Tip>
  Using subdomains lets you keep your root domain's MX records pointing to your regular email provider (Gmail, Microsoft 365, etc.) while routing specific addresses through Lettr.
</Tip>

## DNS Propagation

DNS changes can take time to propagate:

| Typical Time   | Description        |
| -------------- | ------------------ |
| 5 minutes      | Most DNS providers |
| 1-4 hours      | Some registrars    |
| Up to 48 hours | Worst case         |

<Warning>
  If verification fails immediately after adding records, wait 15-30 minutes and try again. Use a tool like [MXToolbox](https://mxtoolbox.com/) to check your MX records externally.
</Warning>

## Next Steps

<CardGroup cols={2}>
  <Card title="Webhooks" icon="webhook" href="/learn/webhooks/introduction">
    Receive notifications when emails arrive
  </Card>

  <Card title="Routing" icon="route" href="/learn/inbound/routing">
    Route emails to different handlers
  </Card>

  <Card title="Attachments" icon="paperclip" href="/learn/inbound/attachments">
    Handle incoming attachments
  </Card>

  <Card title="Inbound Domains" icon="globe" href="/learn/domains/inbound-domains">
    Learn more about domain configuration
  </Card>
</CardGroup>
