# `jadpo email`

Read the dev inbox and check mail.

Reads the inbox `jadpo dev` catches every mail in (area 16), so nothing leaves the machine: `list` shows each mail's id, email, address, subject and health, oldest first; `show` prints one with its text (`--html` for its HTML), its links numbered, its attachments and what Jadpo's health checks found, each with its fix; `links` lists its links; `open` opens one, by its number or written out, in the browser (`$BROWSER`, else the system's); `clear` empties the inbox. A health score is an early indication only: it can't predict whether any provider puts a mail in the inbox. `check-domain` reads the sending domain's SPF, DKIM (with `--selector`) and DMARC records, the domain given or `email: { from: }`'s. The inbox keeps the last 200 mails in build/dev/, which is never committed.

Also: `jadpo mail`.

```text
jadpo email [action] [mail] [link]
```

## Arguments

- `action` (optional): What to do: list, show, links, open, clear or check-domain
- `mail` (optional): The mail's id for show, links and open; the domain for check-domain
- `link` (optional): The link to open, by its number or written out

## Flags

- `--to <address>`: List only the mail sent to this address
- `--html`: Show the mail's HTML instead of its text
- `--selector <name>`: The DKIM selector check-domain reads

## On every command

- `--json`: Print data for tools instead of text
- `--help`: Show every flag, with examples
- `--color <when>`: Choose when to use colour

`jadpo email --json` writes one JSON document to standard output instead of text, with the same exit code. The document has `schemaVersion`, `command` (`"email"`), `ok`, `data` (what the command produced, `null` when it failed) and `diagnostics` (each error with its `rule`, `reason`, `next` and `help`). A command that needs a terminal refuses `--json` and names the flags that do the same job.

## Examples

```text
# See the mail the app sent
jadpo email
# Read a sign-in email and its links
jadpo email show mail_3
# Follow its first link in the browser
jadpo email open mail_3 1
# Check the sending domain's records
jadpo email check-domain --selector resend
```

## Errors

- [`cli.email_arguments`](../errors/cli.email_arguments.md): Email command has invalid arguments
- [`toolchain.project_not_found`](../errors/toolchain.project_not_found.md): Project could not be found
