1---
2name: charm-pop
3description: "Send emails from the terminal with pop - TUI and CLI modes, SMTP and Resend support, attachments. Use when sending email from terminal, pop, CLI email, or piping email content from shell scripts."
4---
5
6# charm-pop
7
8CLI and TUI tool for sending emails from the terminal. Requires either a `RESEND_API_KEY` or SMTP config.
9
10## Launch
11
12```bash
13pop # open TUI
14```
15
16## CLI Usage
17
18```bash
19pop < message.md \
20 --from "me@example.com" \
21 --to "you@example.com" \
22 --subject "Hello" \
23 --attach invoice.pdf
24
25pop --preview # preview before sending
26```
27
28Body is read from stdin. `--preview` opens TUI for review before send.
29
30## Auth: Resend
31
32```bash
33export RESEND_API_KEY=re_xxxx
34```
35
36Get key at https://resend.com/api-keys. No custom domain: use `onboarding@resend.dev` as sender.
37
38## Auth: SMTP
39
40```bash
41export POP_SMTP_HOST=smtp.gmail.com
42export POP_SMTP_PORT=587
43export POP_SMTP_USERNAME=you@gmail.com
44export POP_SMTP_PASSWORD=hunter2
45```
46
47## Env Defaults
48
49```bash
50export POP_FROM=you@example.com
51export POP_SIGNATURE="Sent with Pop!"
52```
53
54Saves typing `--from` every time.
55
56## Attachments
57
58```bash
59pop --attach file.pdf --attach image.png < body.txt
60```
61
62Multiple `--attach` flags supported.
63
64## Pipelines
65
66```bash
67# AI-written body via mods
68pop <<< "$(mods -f 'Write a status update')" \
69 --subject "Weekly update" --preview
70
71# Pick sender with gum
72pop --from $(gum choose "a@x.com" "b@x.com") \
73 --to $(gum filter < contacts.txt)
74
75# Generate and send invoice
76invoice generate --item "Work" --rate 100 --output inv.pdf
77pop --attach inv.pdf --body "Invoice attached."
78```
79
80## Flags Reference
81
82| Flag | Description |
83|------|-------------|
84| `--from` | Sender address |
85| `--to` | Recipient (repeatable) |
86| `--subject` | Email subject |
87| `--body` | Body text (or use stdin) |
88| `--attach` | File path to attach (repeatable) |
89| `--preview` | Open TUI preview before sending |
90
91## Install
92
93```bash
94brew install pop # macOS/Linux
95go install github.com/charmbracelet/pop@latest
96```