Open "new mail" dialog in mutt with attachment

206 Views Asked by At

Is it possible to open mutt via a commandline flag directly in the "new mail" dialog with a file already attached? I want to make myself a ranger-shortcut to open mutt and attach a file to a mail. Is that possible? Do you have any ideas how I could make that?

1

There are 1 best solutions below

0
On BEST ANSWER

You can add one or more attachment files directly when calling mutt. For example:

mutt [email protected] -a /tmp/file1.txt -a /tmp/file2.png -s "subject line"

Unless a message body is fed into stdin (like cat message | mutt ...), the editor will open for typing in the message body.