Dave's Brain

Browse - Computer Tips - How can I mail an attachment from the command line?

Date: 2013aug12
OS: Linux

Q.  How can I mail an attachment from the command line?

A.  Use mutt.  Like this:

echo 'The message body' | mutt -a file_to_attach -s 'The Subject' -- recip@example.com

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.