pop
2 min read
Pop is a tool for sending emails from your terminal.

Pop

Usage
Usage: pop [options]

OptionEnvironment VariableDescription
-a, --attach strings-Email's attachments
--bcc strings-BCC recipients
-b, --body string-Email's contents
--cc strings-CC recipients
-f, --from string$POP_FROMEmail's sender
--preview-Preview the email
-r, --resend.key string$RESEND_API_KEYAPI key for Resend.com
-x, --signature string$POP_SIGNATURESignature
-e, --smtp.encryption string$POP_SMTP_ENCRYPTIONEncryption type
-H, --smtp.host string$POP_SMTP_HOSTHost of SMTP server
-i, --smtp.insecure$POP_SMTP_INSECURE_SKIP_VERIFYSkip TLS verification
-p, --smtp.password string$POP_SMTP_PASSWORDPassword of SMTP server
-P, --smtp.port int$POP_SMTP_PORTPort of SMTP server
-U, --smtp.username string$POP_SMTP_USERNAMEUsername of SMTP server
-s, --subject string-Email's subject
-t, --to strings-Recipients
-u, --unsafe-Allow unsafe HTML

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 host.

You can grab one from: 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 Configuration
To configure pop to use SMTP, you can set the following environment variables.

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.