View Full Version : [all variants] Attachment with Mutt

October 2nd, 2010, 07:30 PM
# echo "Body" | mutt -a foo -s "Test" john@domain.com
Can't stat john@domain.com: No such file or directory
john@domain.com: unable to attach file.

The file "foo" exists, and I don't get why it's trying to stat the email. Without the -a option and it's arg it works just fine.

October 3rd, 2010, 01:34 AM
man mutt says:

-a file [...]
Attach a file to your message using MIME. When attaching single or multiple files, separating file‐
names and recipient addresses with "--" is mandatory, e.g. mutt -a image.jpg -- addr1 or mutt -a
img.jpg *.png -- addr1 addr2. The -a option must be placed at the end of command line options.

So you want to do

echo "Body" | mutt -s "Test" -a foo -- john@domain.com