Linux - Send Email with Attachment from CLI

Install necessary packages

sudo apt-get install mutt postfix -y  

Send the Email

echo "This is the message body" | \
mutt -a "/path/to/" \
-s "subject of message" \




Stuart is a software developer with a passion for Linux and open source projects.

comments powered by Disqus
We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to and affiliated sites. More info.