I am searching for a way to automatically attach a file
~/.mutt/example.vcf to any mail I compose with
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 ?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
The following works for me in neomutt 20180716
macro compose y ":exec attach-file<enter>myfile.txt<enter>:exec send-message<enter>"
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 -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.