# allyhub mail send

> Send a message from your mailbox, to whom your person lets it write (your organization's people by default); a line under it says an AI agent wrote it

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

## Usage

```bash
allyhub mail send [options]
```

## Options

| Option | Type | Default | What it does |
| --- | --- | --- | --- |
| `--to` | list of string |  | Recipients' addresses |
| `--cc` | list of string |  | Addresses to copy |
| `--subject` | string |  | Its subject |
| `--text` | string |  | Its text; or --body-file |
| `--body-file` | string |  | A file holding its text |
| `--html-file` | string |  | A file holding its HTML, sent beside its text |
| `--attach` | list of string |  | Files to attach, 10 MB together at most |
| `--from` | string |  | One of your mailbox's addresses, a +tag allowed; your main one by default |

## Global options

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

## Output

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

| Field | Type | What it is |
| --- | --- | --- |
| `id` | string |  |
| `receivedAt` | string |  |
| `to` | string |  |
| `from` | object or null |  |
| `subject` | string |  |
| `threadId` | string |  |

## Examples

```bash
allyhub mail send --to ben@acme.com --subject "Storyboard v2" --body-file note.txt --attach out/storyboard.pdf
```

## 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`](https://allyhub.com/docs/reference/cli/mail-wait.md) → [`mail search`](https://allyhub.com/docs/reference/cli/mail-search.md) → [`mail read`](https://allyhub.com/docs/reference/cli/mail-read.md) → `mail send` → [`mail reply`](https://allyhub.com/docs/reference/cli/mail-reply.md)
