Quick and Convenient Command Line E-mail

If you spend a considerable amount of time in your terminal, you might find the ability to fire off short emails from within it—without context-switching to your mail client or browser or whichever means you use—a convenient shortcut. Not to mention the utility it affords any number of use cases you might later choose to implement; a simple shell script, for example, can deliver notifications via email. It's a convenient feature of Unices that requires very little setup.

First, edit /etc/mail/secrets, as a privileged user, to store your credentials in the following format:

relayid relayuser:secretpassword

Where relayuser …

more ...