I am searching for a way to automatically attach a file ~/.mutt/example.vcf
to any mail I compose with mutt
.
I tried something like send-hook 'attach-file ~/.mutt/fauve.vcf'
but it doesn't work.
Have you, please, any idea how to do that ?
The following works for me in neomutt 20180716
macro compose y ":exec attach-file<enter>myfile.txt<enter>:exec send-message<enter>"
To explain:
I dont know mutt, but I can tell you in mail or mailx I usually do uuencode myAttachment.tar.gz attachmentName | mail -s "Here is that dolphin porn you requested" [email protected]
[edit]
Easiest solution consist in to just create a simple alias for mutt:
alias mutt="/usr/bin/mutt -a $HOME/.std.vcf"
so if you enter mutt
mutt -a $HOME/.std.vcf
will be executed. That's it!
Normally in order to compose a email with attachments mime-construct
is used:
mime-construct --to "nerd@example" --subject 'hi there' \
--string "test" --file-attach /etc/motd
There are some solutions to automaticly add your *.vcf:
However, it is unusual to use vcf on unices where a signature is more common.