5 ms·
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
by heinrichhartman 3y ago
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-email-using-sendmail-command-in-linux https://stackoverflow.com/questions/57410259/how-to-send-an-...
- flir 3y agoAlmost sounds like you need a user completion script that queries your address book. (Implementation left as an exercise for the reader).
- maaslalani 3y agoYou can use the `--to` flag and something like FZF or Gum to populate that from a text file. `pop --to $(fzf contacts.txt)`
- pwg 3y agoProvided 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".