Category: Mail Commands

How to send mail from the shell prompt

By peter, September 11, 2009

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

OfficeFolders theme by Themocracy