Send a simple message from the command-line
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. msg.txt
. Then 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 me@example.com
Options:
-n – bypass the system configuration
-s – subject
-a – attach a file