Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/charmbracelet/pop
Send emails from your terminal 📬
https://github.com/charmbracelet/pop
Last synced: 29 days ago
JSON representation
Send emails from your terminal 📬
- Host: GitHub
- URL: https://github.com/charmbracelet/pop
- Owner: charmbracelet
- License: mit
- Created: 2023-06-21T18:45:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-03T10:43:32.000Z (7 months ago)
- Last Synced: 2024-04-14T07:38:32.009Z (7 months ago)
- Language: Go
- Homepage:
- Size: 127 KB
- Stars: 2,087
- Watchers: 6
- Forks: 38
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- jimsghstars - charmbracelet/pop - Send emails from your terminal 📬 (Go)
README
# Pop
Send emails from your terminal.
## Text-based User Interface
Launch the TUI
```bash
pop
```## Command Line Interface
```bash
pop < message.md \
--from "[email protected]" \
--to "[email protected]" \
--subject "Hello, world!" \
--attach invoice.pdf
```---
To use `pop`, you will need a `RESEND_API_KEY` or configure an
[`SMTP`](#smtp-configuration) 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.```bash
export RESEND_API_KEY=$(pass RESEND_API_KEY)
```### SMTP Configuration
To configure `pop` to use `SMTP`, you can set the following environment
variables.```bash
export POP_SMTP_HOST=smtp.gmail.com
export POP_SMTP_PORT=587
export [email protected]
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`.```bash
export [email protected]
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
> `[email protected]` to send emails.## Installation
Use a package manager:
```bash
# macOS or Linux
brew install pop# Nix
nix-env -iA nixpkgs.pop# Arch (btw)
yay -S charm-pop-bin
```Install with Go:
```sh
go install github.com/charmbracelet/pop@latest
```Or download a binary from the [releases](https://github.com/charmbracelet/pop/releases).
## Examples
Pop can be combined with other tools to create powerful email pipelines, such as:
- [`charmbracelet/mods`](https://github.com/charmbracelet/mods)
- [`charmbracelet/gum`](https://github.com/charmbracelet/gum)
- [`maaslalani/invoice`](https://github.com/maaslalani/invoice)### Mods
Use [`mods`](https://github.com/charmbracelet/mods) with `pop` to write an email body with AI:
> **Note**:
> Use the `--preview` flag to preview the email and make changes before sending.```bash
pop <<< "$(mods -f 'Explain why CLIs are awesome')" \
--subject "The command line is the best" \
--preview
```- [`charmbracelet/mods`](https://github.com/charmbracelet/mods)
### Gum
Use [`gum`](https://github.com/charmbracelet/gum) with `pop` to choose an email to send to and from:
```bash
pop --from $(gum choose "[email protected]" "[email protected]" "[email protected]")
--to $(gum filter < contacts.txt)
```- [`charmbracelet/gum`](https://github.com/charmbracelet/gum)
### Invoice
Use [`invoice`](https://github.com/maaslalani/invoice) with `pop` to generate and send invoices entirely from the command line.
```bash
FILENAME=invoice.pdf
invoice generate --item "Rubber Ducky" --rate 25 --quantity 2 --output $FILENAME
pop --attach $FILENAME --body "See attached invoice."
```- [`maaslalani/invoice`](https://github.com/maaslalani/invoice)
## Feedback
We’d love to hear your thoughts on this project. Feel free to drop us a note!
- [Twitter](https://twitter.com/charmcli)
- [The Fediverse](https://mastodon.social/@charmcli)
- [Discord](https://charm.sh/chat)## License
[MIT](https://github.com/charmbracelet/pop/blob/main/LICENSE)
---
Part of [Charm](https://charm.sh).
Charm 热爱开源 • Charm loves open source