mutt -s “Test mail” -a /tmp/shahzeb.tar.gz email@example.com < /tmp/mailmessage.txt
- firstname.lastname@example.org – is the recipient.
- /tmp/mailmessage.txt – is the main body of the e-mail (read message from the file “mailmessage.txt”).
- -a /tmp/shahzeb.tar.gz – is an attachment.
- -s “Test mail” – is a subject line of email Message.
If MUTT is not available???
If mutt is not installed, use the apt-get or yum or up2date commands as follows (you must login as a root user). Debian / Ubuntu Linux user type the following command to install mutt client:
# apt-get install mutt
# yum install mutt