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

# How email capture works

> How DevHelm stores mail sent to a testing domain, and how long your plan keeps it

Mail to any address on an email testing domain is captured for that workspace. Use it for sign-up codes, notification checks, and other tests that need a real inbox.

## Addresses

An assigned domain is ready as soon as it is created. DevHelm owns its DNS. Every local-part on that domain is its own inbox: `signup@your-domain`, `otp-42@your-domain`, and anything else you put in front of the `@`.

```bash theme={null}
devhelm email address --domain your-domain.example --label signup
```

The command prints one address. `--label` is a prefix. The SDK and CLI add random characters after it, so each call is a new inbox on that domain.

To list the domains already in the workspace:

```bash theme={null}
devhelm email domains list
```

## What is stored

Each captured message keeps the sender, recipients, subject, a body preview, extracted one-time codes, links, and attachment names. The full original message is available as a raw download. The list and wait responses include `otp` (`value`, and `source` of `text` or `html`) and `links` (`href`, and `text` when the message had visible link text).

## How long messages are kept

The domain Settings page shows how many days the current plan keeps messages:

| Plan | Days |
| - | - |
| Free | 3 |
| Developer | 7 |
| Team | 30 |
| Business | 90 |
| Enterprise | 365 |

A message body over 1 MiB is refused. The same limit applies on every plan.

## Next steps

<CardGroup cols={2}>
  <Card title="Wait for an email" icon="timer" href="/testing/email/wait">
    Block a test until the next message arrives.
  </Card>

  <Card title="OTPs and links" icon="key" href="/testing/email/otp-and-links">
    Read a code or a link from the stored message.
  </Card>

  <Card title="Custom domains" icon="network-wired" href="/testing/email/custom-domains">
    Receive mail on a hostname you own.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.