Posted by peter on October 18, 2011
To send a mail from the command prompt use the following command (all in one line):
mail -v -r reply@address.co.za -s “subject goes here” -a /pathto/attachment.txt < /pathto/bodyofmail.txt recipient@destinationaddress.co.za
You may like to use this command in a script, or just from the command prompt as a quick way of e-mailing someone a file
The above might differ a little from distro to distro, but the principle is the same.