In the following example, I can use comma to send the same message to 2 recipients. But I can not use comma to send 2 files.
echo "Here is the file you requested" | mutt -s "attaching file" -a one.txt -- ,How do I send the second.txt file in the same command?
2 Answers
echo "Here is the file you requested" | mutt -s "attaching file" -a one.txt -a two.txt -- ,Should work. A lot more work for 10-20 files though.
As said in mutt manual (version 1.5.21).
-a file [...] Attach a file to your message using MIME. When attaching single or multiple files, separating filenames 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 this will be ok:
echo "Here is the file you requested" | mutt -s "attaching file" -a one.txt second.txt -- , 2