knowledge/technology/applications/cli/pop.md
2024-09-04 12:50:38 +02:00

3.8 KiB

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

pop

Pop is a tool for sending emails from your terminal.

Pop

Usage

Usage: pop [options]

Option Environment Variable Description
-a, --attach strings - Email's attachments
--bcc strings - BCC recipients
-b, --body string - Email's contents
--cc strings - CC recipients
-f, --from string $POP_FROM Email's sender
--preview - Preview the email
-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 server
-i, --smtp.insecure $POP_SMTP_INSECURE_SKIP_VERIFY Skip TLS verification
-p, --smtp.password string $POP_SMTP_PASSWORD Password of SMTP server
-P, --smtp.port int $POP_SMTP_PORT Port of SMTP server
-U, --smtp.username string $POP_SMTP_USERNAME Username 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

pop

Command Line Interface

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.

export RESEND_API_KEY=$(pass RESEND_API_KEY)

SMTP Configuration

To configure pop to use SMTP, you can set the following environment variables.

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.

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.