Send e-mail with attachment from command line
mpack is a command line tool that can send e-mail with MIME formatted attachment.
mpack -a -s "My subject From: Sender<email@example.com>" -d messagebody.txt attachment.file firstname.lastname@example.org
Since mpack accepts linebreaks in the -s option (which is actually ment to set the subject line) we can include other headers right after it. Just like I did in my example.
This has been tested on mpack version 1.6
One thought on “Send e-mail with attachment from command line”
Great job. Been messing about trying to make this work without success. Your tip works a treat.
Comments are closed.