# Email CLI Reference

Deploy and manage AWS SES email infrastructure with event tracking, analytics, and domain management.

## wraps email init

Deploy new email infrastructure to your AWS account.

```bash
npx @wraps.dev/cli email init [options]
```

Deploys: SES configuration set, DynamoDB event history table, Lambda processor, EventBridge rules, IAM roles with OIDC trust policies.

Interactive: prompts for AWS region, configuration preset (Starter / Production / Enterprise), and shows estimated monthly costs before deploying.

Options:
- `--region <region>` — AWS region (default: prompted)
- `--preset <preset>` — Configuration preset: `starter`, `production`, or `enterprise`
- `--yes` — Skip confirmation prompts

## wraps email status

Check the status of your deployed email infrastructure.

```bash
npx @wraps.dev/cli email status
```

Shows: deployment status, AWS region, SES configuration, DynamoDB table, Lambda function, EventBridge rules.

## wraps email destroy

Remove all Wraps email infrastructure from your AWS account.

```bash
npx @wraps.dev/cli email destroy [options]
```

Options:
- `-f, --force` — Skip confirmation prompt

Removes all `wraps-email-*` resources. Non-destructive to other AWS resources.

## wraps email domains

Manage domains in AWS SES.

### wraps email domains add

```bash
npx @wraps.dev/cli email domains add -d <domain>
```

Adds a domain to SES with DKIM signing enabled. Options: `-d, --domain <domain>` (required)

### wraps email domains list

```bash
npx @wraps.dev/cli email domains list
```

Lists all domains in SES with verification and DKIM status.

### wraps email domains get-dkim

```bash
npx @wraps.dev/cli email domains get-dkim -d <domain>
```

Retrieves DKIM CNAME records to add to your DNS provider. Options: `-d, --domain <domain>` (required)

### wraps email domains verify

```bash
npx @wraps.dev/cli email domains verify -d <domain>
```

Checks DNS verification status: SES domain status, DKIM records (3 CNAMEs), SPF TXT record, DMARC TXT record, MAIL FROM MX records. Provides copy-paste DNS record values.

### wraps email domains remove

```bash
npx @wraps.dev/cli email domains remove -d <domain> [-f]
```

Removes a domain from SES. Options: `-d` domain (required), `-f` skip confirmation.

### wraps email domains config

```bash
npx @wraps.dev/cli email domains config [options]
```

Configure SES configuration set options for a domain. Interactive menu or non-interactive via flags.

Options:
- `-d, --domain <domain>` — Domain to configure
- `--opens / --no-opens` — Open tracking
- `--clicks / --no-clicks` — Click tracking
- `--tls-required / --no-tls-required` — Require TLS delivery
- `--sending-enabled / --no-sending-enabled` — Enable/disable sending
- `--reputation-metrics / --no-reputation-metrics` — Reputation metrics
- `--suppress-bounce / --no-suppress-bounce` — Bounce suppression
- `--suppress-complaint / --no-suppress-complaint` — Complaint suppression
- `--archive / --no-archive` — Email archiving via Mail Manager
- `--vdm-engagement / --no-vdm-engagement` — VDM engagement tracking
- `--vdm-inbox / --no-vdm-inbox` — VDM inbox placement optimization

## wraps email inbound init

Deploy inbound email infrastructure (S3 receipt rules + EventBridge).

```bash
npx @wraps.dev/cli email inbound init
```

Prompts for webhook URL and creates EventBridge→HTTP rule with `X-Wraps-Inbound-Key` HMAC header.

## Global Options

- `--help, -h` — Show help
- `--version, -v` — Show version
