Hacker News new | past | comments | ask | show | jobs | submit login

As other's have pointed out, sending emails from the command line is a solved problem [1]:

    sendmail user@example.com < email.txt

    mail -s "Test Subject" user@example.com < body.txt
What keeps me from actually using this, is the lack of Address Book, as I don't memorize email addresses from all my friends and colleagues. Any suggestions on how to integrate my Gmail Address book into a command line workflow?

[1] https://stackoverflow.com/questions/57410259/how-to-send-an-...




Provided you are willing to build the alias [1] mapping list, mutt can use aliases on the CLI to send emails.

So if you had aliased "user@example.com" to "bob", you could do:

    mutt -s "Test Subject" bob < body.txt
I do not know of a way to automatically generate a mutt alias file from a gmail address book.

[1] Mutt refers to its address book as "aliases".


You can use the `--to` flag and something like FZF or Gum to populate that from a text file.

`pop --to $(fzf contacts.txt)`


Almost sounds like you need a user completion script that queries your address book. (Implementation left as an exercise for the reader).




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: