# allyhub mail wait

> Wait for the next message that matches, received after --since (by default, when the wait starts), and print it whole

Source: https://allyhub.com/docs/reference/cli/mail-wait · AllyHub 0.10.0
Index of all docs: https://allyhub.com/llms.txt

## Usage

```bash
allyhub mail wait [options]
```

## Options

| Option | Type | Default | What it does |
| --- | --- | --- | --- |
| `--to` | string |  | Sent to this address (or its part before @), with or without its +tag |
| `--from` | string |  | A part of the sender's address or name |
| `--subject` | string |  | A part of the subject |
| `--text` | string |  | A part of the text |
| `--project` | string |  | Sent to an address labelled with this project |
| `--thread` | string |  | In this thread (a thread id) |
| `--since` | string |  | Count mail received after this moment (ISO 8601); give the moment before you acted, so a message that came first is not missed |
| `--timeout` | number | `120` | Seconds to wait before giving up |
| `--every` | number | `3` | Seconds between looks |

## Global options

`--json`: print the result as JSON.

## Output

With `--json`, the command prints an object with these fields:

| Field | Type | What it is |
| --- | --- | --- |
| `message` | object or null |  |
| `timedOut` | boolean |  |

## Examples

```bash
allyhub mail wait --to ada.acme+staging --from staging.example --since "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
```

## Exit codes

`0` when it succeeds; the others are listed in [Exit codes](https://allyhub.com/docs/reference/cli/exit-codes.md).

## In the work

**mailbox**: An address of your own: signing up to a site, its codes and links, mail people send you and your answers

[`mail addresses`](https://allyhub.com/docs/reference/cli/mail-addresses.md) → [`mail alias`](https://allyhub.com/docs/reference/cli/mail-alias.md) → `mail wait` → [`mail search`](https://allyhub.com/docs/reference/cli/mail-search.md) → [`mail read`](https://allyhub.com/docs/reference/cli/mail-read.md) → [`mail send`](https://allyhub.com/docs/reference/cli/mail-send.md) → [`mail reply`](https://allyhub.com/docs/reference/cli/mail-reply.md)
