Need to send yourself or someone else a quick email from the Linux command-line? Use
mutt. First I compose the message in a file, e.g.
cat it, and invoke
mutt. The example below also includes an attachment – a python script I was sending myself.
cat msg.txt | mutt -s "version 2.0" -n -a sample.py firstname.lastname@example.org
-n – bypass the system configuration
-s – subject
-a – attach a file