# `bird email mailboxes compose`

## Usage

```bash
bird email mailboxes compose <mailbox-id> [flags]
```

## Description

Send a new message from a mailbox

Sends a new email from the mailbox's own address and starts a new conversation. Replies from recipients thread back automatically. To reply within an existing conversation, use "bird email threads messages reply".

Build the request from flags, a JSON EmailMailboxComposeRequest body via --body-file ("-" reads
stdin), or both — a flag overrides the matching body field. Run --example to
print a ready-to-edit body, or --dry-run to print the resolved request without
sending it.

## Examples

```bash
# print the body shape (no credentials needed)
bird email mailboxes compose --example

# preview the resolved request without sending
bird email mailboxes compose <mailbox-id> --to alice@example.com --subject "Hi" --text "Hello" --dry-run
```

## Options

#### Recipients

| Name                   | Description                                                                              |
| ---------------------- | ---------------------------------------------------------------------------------------- |
| `--to <v1,v2,…>`       | Primary recipient; repeatable. Accepts bare addresses or RFC 5322 "Name &lt;addr>" form. |
| `--cc <v1,v2,…>`       | CC recipient; repeatable.                                                                |
| `--bcc <v1,v2,…>`      | BCC recipient; repeatable.                                                               |
| `--reply-to <v1,v2,…>` | Reply-To address; repeatable. Omit to use the mailbox's default.                         |

#### Content

| Name        | Description                                                    |
| ----------- | -------------------------------------------------------------- |
| `--subject` | Message subject line.                                          |
| `--html`    | HTML body. At least one of --html or --text is required.       |
| `--text`    | Plain-text body. At least one of --html or --text is required. |

#### Labels & metadata

| Name                | Description                                  |
| ------------------- | -------------------------------------------- |
| `--tag <key=value>` | Tag as name=value; repeatable.               |
| `--metadata`        | Arbitrary JSON metadata object (up to 2 KB). |

#### Delivery

| Name         | Description                                               |
| ------------ | --------------------------------------------------------- |
| `--category` | Suppression policy: marketing or transactional (default). |

#### Request

| Name                | Description                                                  |
| ------------------- | ------------------------------------------------------------ |
| `--body-file`       | Read the JSON request body from this file; "-" reads stdin   |
| `--example`         | Print a complete example request body, then exit             |
| `--dry-run`         | Print the resolved request without sending it, then exit     |
| `--idempotency-key` | Deduplication key; a retry with the same key won't act twice |

#### Options

| Name                | Description                                      |
| ------------------- | ------------------------------------------------ |
| `--response-schema` | Print the fields this command returns, then exit |

## Related

| Name                                                                          | Description                |
| ----------------------------------------------------------------------------- | -------------------------- |
| [`bird email mailboxes create`](/docs/cli/reference/email-mailboxes-create)   | Create a mailbox           |
| [`bird email mailboxes delete`](/docs/cli/reference/email-mailboxes-delete)   | Delete a mailbox           |
| [`bird email mailboxes get`](/docs/cli/reference/email-mailboxes-get)         | Get a mailbox              |
| [`bird email mailboxes labels`](/docs/cli/reference/email-mailboxes-labels)   | List a mailbox's labels    |
| [`bird email mailboxes list`](/docs/cli/reference/email-mailboxes-list)       | List mailboxes             |
| [`bird email mailboxes restore`](/docs/cli/reference/email-mailboxes-restore) | Restore a deleted mailbox  |
| [`bird email mailboxes resume`](/docs/cli/reference/email-mailboxes-resume)   | Resume a suspended mailbox |
| [`bird email mailboxes stats`](/docs/cli/reference/email-mailboxes-stats)     | Mailbox email statistics   |
| [`bird email mailboxes update`](/docs/cli/reference/email-mailboxes-update)   | Update a mailbox           |