Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mutt command with multiple attachments in single mail unix

Tags:

People also ask

How do you send multiple attachments on mutt?

To attach multiple files, separating filenames and recipient addresses with "--" is mandatory, e.g. mutt -a img. jpg *. png -- addr1 addr2.

How do I send multiple attachments within a single email?

Navigate to the file location for your files. Click the first one, and then hold the Control key and click the additional files. Press the button to choose your files and close the browse window. Depending on the program you are using, the button will say something like “Insert” or “Open.”

How do I put multiple attachments in one document?

Luckily, there's an easy way to email lots of files as one single attachment. All you have to do is place all of the files you wish to send into a compressed 'zipped' folder. Here's how to create a zipped (compressed) folder: 1 – Right-click on the Windows Desktop, then click New>Folder.


My requirement is to attach all the .csv files in a folder and send them in a single mail.

Here is what have tried,

mutt -s "subject" -a *.csv -- [email protected] < subject.txt 

The above command is not working (It's not recognizing multiple files) and throwing the error

Error sending message, child exited 67 (User unknown.). Could not send the message. 

Then I tried using multiple -a option as follows,

mutt -s "subject" -a aaa.csv -a bbb.csv -- [email protected] < subject.txt 

This works as expected. But this is not feasible for 100 files for example. I should be able use it with file mask (as like *.csv to take all csv files). Is there is any way we can use like *.csv in single command?

Thanks