---
obj: application
repo: https://github.com/charmbracelet/pop
rev: 2024-05-27
---

# pop
Pop is a tool for sending [emails](../../internet/eMail.md)  from your terminal.

![Pop](./pop.avif)

## Usage
Usage: `pop [options]`

| Option                         | Environment Variable             | Description                                       |
| ------------------------------ | -------------------------------- | ------------------------------------------------- |
| `-a, --attach strings`         | -                                | [Email](../../internet/eMail.md)'s attachments    |
| `--bcc strings`                | -                                | BCC recipients                                    |
| `-b, --body string`            | -                                | [Email](../../internet/eMail.md)'s contents       |
| `--cc strings`                 | -                                | CC recipients                                     |
| `-f, --from string`            | `$POP_FROM`                      | [Email](../../internet/eMail.md)'s sender         |
| `--preview`                    | -                                | Preview the [email](../../internet/eMail.md)      |
| `-r, --resend.key string`      | `$RESEND_API_KEY`                | API key for Resend.com                            |
| `-x, --signature string`       | `$POP_SIGNATURE`                 | Signature                                         |
| `-e, --smtp.encryption string` | `$POP_SMTP_ENCRYPTION`           | Encryption type                                   |
| `-H, --smtp.host string`       | `$POP_SMTP_HOST`                 | Host of [SMTP](../../internet/SMTP.md) server     |
| `-i, --smtp.insecure`          | `$POP_SMTP_INSECURE_SKIP_VERIFY` | Skip TLS verification                             |
| `-p, --smtp.password string`   | `$POP_SMTP_PASSWORD`             | Password of [SMTP](../../internet/SMTP.md) server |
| `-P, --smtp.port int`          | `$POP_SMTP_PORT`                 | Port of [SMTP](../../internet/SMTP.md) server     |
| `-U, --smtp.username string`   | `$POP_SMTP_USERNAME`             | Username of [SMTP](../../internet/SMTP.md) server |
| `-s, --subject string`         | -                                | [Email](../../internet/eMail.md)'s subject        |
| `-t, --to strings`             | -                                | Recipients                                        |
| `-u, --unsafe`                 | -                                | Allow unsafe [HTML](../../internet/HTML.md)       |

## Text-based User Interface
Launch the TUI
```shell
pop
```

## Command Line Interface
```shell
pop < message.md \
    --from "me@example.com" \
    --to "you@example.com" \
    --subject "Hello, world!" \
    --attach invoice.pdf
```

To use `pop`, you will need a `RESEND_API_KEY` or configure an [`SMTP`](../../internet/SMTP.md) host.

You can grab one from: [https://resend.com/api-keys](https://resend.com/api-keys).

### Resend Configuration
To use the resend delivery method, set the `RESEND_API_KEY` environment variable.

```shell
export RESEND_API_KEY=$(pass RESEND_API_KEY)
```

### [SMTP](../../internet/SMTP.md) Configuration
To configure `pop` to use [`SMTP`](../../internet/SMTP.md), you can set the following [environment variables](../../linux/Environment%20Variables.md).

```shell
export POP_SMTP_HOST=smtp.gmail.com
export POP_SMTP_PORT=587
export POP_SMTP_USERNAME=pop@charm.sh
export POP_SMTP_PASSWORD=hunter2
```

### Environment
To avoid typing your `From:`  email address, you can also set the `POP_FROM` environment to pre-fill the field anytime you launch `pop`.

```shell
export POP_FROM=pop@charm.sh
export POP_SIGNATURE="Sent with [Pop](https://github.com/charmbracelet/pop)!"
```

> **Note**: If you wish to use a resend account without a custom domain, you can use `onboarding@resend.dev` to send emails.
