Weblog of Abdullah Rubiyath :: Alif

Exploring the Web: An apple a day

Blogs

Send Email with file attachment from terminal using mutt

Sat, 03/20/2010 - 10:06 -- alif

Sometimes I run into situation where I need to email a file, and I am lazy to open a browser, login to my email account, and then attach file and send it.

If you are like me, then mutt is a neat command for sending emails from terminal quickly =P.

The code looks like below:

echo "email body" | mutt emailaddress@gmail.com -s "email subject" -a "file-to-be-attached"

So, if I need to email a file code.zip (in the same directory), I would use the following:

Pages

Subscribe to RSS - blogs