Automatically attach a file to a mail with mutt

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












2















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 ?










share|improve this question




























    2















    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 ?










    share|improve this question


























      2












      2








      2








      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 ?










      share|improve this question
















      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 ?







      email mutt






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 29 '15 at 19:58







      fauve

















      asked Jan 11 '14 at 21:29









      fauvefauve

      311320




      311320




















          2 Answers
          2






          active

          oldest

          votes


















          0














          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" somedude@earthlink.cc.net.foo






          share|improve this answer























          • uuencode wasn’t installed in my system and was able to send mails with mutt.

            – fauve
            Jan 13 '14 at 17:34


















          0














          [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:



          vcf-to-mutt
          muttquery.py



          However, it is unusual to use vcf on unices where a signature is more common.






          share|improve this answer

























          • I haven’t mime-construct installed so I can send mails with mutt. Then, if what I want to do need the installation of mime-construct, I will install it.

            – fauve
            Jan 11 '14 at 23:51












          • Thank you for vcf-to-mutt and muttquery. I will try them. Yes, I can use a link to my vcf but some email program sync automatically the addressbook when they found a vcf as an attachment. That’s why I prefer this way :)

            – fauve
            Jan 13 '14 at 17:36












          • Vcf-to-mutt is an interesting script. Thank you o/ but it doesn’t resolve my problem :) Perhaps the solution are very complicated. Then as you tell me I will probably forget this idea and only quote the link to my vcard in a signature. Thank you.

            – fauve
            Jan 16 '14 at 18:25












          • updated alias solution

            – user55518
            Jan 16 '14 at 19:19










          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f108916%2fautomatically-attach-a-file-to-a-mail-with-mutt%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          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" somedude@earthlink.cc.net.foo






          share|improve this answer























          • uuencode wasn’t installed in my system and was able to send mails with mutt.

            – fauve
            Jan 13 '14 at 17:34















          0














          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" somedude@earthlink.cc.net.foo






          share|improve this answer























          • uuencode wasn’t installed in my system and was able to send mails with mutt.

            – fauve
            Jan 13 '14 at 17:34













          0












          0








          0







          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" somedude@earthlink.cc.net.foo






          share|improve this answer













          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" somedude@earthlink.cc.net.foo







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 12 '14 at 3:07









          Gregg LeventhalGregg Leventhal

          2,994134375




          2,994134375












          • uuencode wasn’t installed in my system and was able to send mails with mutt.

            – fauve
            Jan 13 '14 at 17:34

















          • uuencode wasn’t installed in my system and was able to send mails with mutt.

            – fauve
            Jan 13 '14 at 17:34
















          uuencode wasn’t installed in my system and was able to send mails with mutt.

          – fauve
          Jan 13 '14 at 17:34





          uuencode wasn’t installed in my system and was able to send mails with mutt.

          – fauve
          Jan 13 '14 at 17:34













          0














          [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:



          vcf-to-mutt
          muttquery.py



          However, it is unusual to use vcf on unices where a signature is more common.






          share|improve this answer

























          • I haven’t mime-construct installed so I can send mails with mutt. Then, if what I want to do need the installation of mime-construct, I will install it.

            – fauve
            Jan 11 '14 at 23:51












          • Thank you for vcf-to-mutt and muttquery. I will try them. Yes, I can use a link to my vcf but some email program sync automatically the addressbook when they found a vcf as an attachment. That’s why I prefer this way :)

            – fauve
            Jan 13 '14 at 17:36












          • Vcf-to-mutt is an interesting script. Thank you o/ but it doesn’t resolve my problem :) Perhaps the solution are very complicated. Then as you tell me I will probably forget this idea and only quote the link to my vcard in a signature. Thank you.

            – fauve
            Jan 16 '14 at 18:25












          • updated alias solution

            – user55518
            Jan 16 '14 at 19:19















          0














          [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:



          vcf-to-mutt
          muttquery.py



          However, it is unusual to use vcf on unices where a signature is more common.






          share|improve this answer

























          • I haven’t mime-construct installed so I can send mails with mutt. Then, if what I want to do need the installation of mime-construct, I will install it.

            – fauve
            Jan 11 '14 at 23:51












          • Thank you for vcf-to-mutt and muttquery. I will try them. Yes, I can use a link to my vcf but some email program sync automatically the addressbook when they found a vcf as an attachment. That’s why I prefer this way :)

            – fauve
            Jan 13 '14 at 17:36












          • Vcf-to-mutt is an interesting script. Thank you o/ but it doesn’t resolve my problem :) Perhaps the solution are very complicated. Then as you tell me I will probably forget this idea and only quote the link to my vcard in a signature. Thank you.

            – fauve
            Jan 16 '14 at 18:25












          • updated alias solution

            – user55518
            Jan 16 '14 at 19:19













          0












          0








          0







          [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:



          vcf-to-mutt
          muttquery.py



          However, it is unusual to use vcf on unices where a signature is more common.






          share|improve this answer















          [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:



          vcf-to-mutt
          muttquery.py



          However, it is unusual to use vcf on unices where a signature is more common.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 18 '14 at 21:36

























          answered Jan 11 '14 at 22:51







          user55518



















          • I haven’t mime-construct installed so I can send mails with mutt. Then, if what I want to do need the installation of mime-construct, I will install it.

            – fauve
            Jan 11 '14 at 23:51












          • Thank you for vcf-to-mutt and muttquery. I will try them. Yes, I can use a link to my vcf but some email program sync automatically the addressbook when they found a vcf as an attachment. That’s why I prefer this way :)

            – fauve
            Jan 13 '14 at 17:36












          • Vcf-to-mutt is an interesting script. Thank you o/ but it doesn’t resolve my problem :) Perhaps the solution are very complicated. Then as you tell me I will probably forget this idea and only quote the link to my vcard in a signature. Thank you.

            – fauve
            Jan 16 '14 at 18:25












          • updated alias solution

            – user55518
            Jan 16 '14 at 19:19

















          • I haven’t mime-construct installed so I can send mails with mutt. Then, if what I want to do need the installation of mime-construct, I will install it.

            – fauve
            Jan 11 '14 at 23:51












          • Thank you for vcf-to-mutt and muttquery. I will try them. Yes, I can use a link to my vcf but some email program sync automatically the addressbook when they found a vcf as an attachment. That’s why I prefer this way :)

            – fauve
            Jan 13 '14 at 17:36












          • Vcf-to-mutt is an interesting script. Thank you o/ but it doesn’t resolve my problem :) Perhaps the solution are very complicated. Then as you tell me I will probably forget this idea and only quote the link to my vcard in a signature. Thank you.

            – fauve
            Jan 16 '14 at 18:25












          • updated alias solution

            – user55518
            Jan 16 '14 at 19:19
















          I haven’t mime-construct installed so I can send mails with mutt. Then, if what I want to do need the installation of mime-construct, I will install it.

          – fauve
          Jan 11 '14 at 23:51






          I haven’t mime-construct installed so I can send mails with mutt. Then, if what I want to do need the installation of mime-construct, I will install it.

          – fauve
          Jan 11 '14 at 23:51














          Thank you for vcf-to-mutt and muttquery. I will try them. Yes, I can use a link to my vcf but some email program sync automatically the addressbook when they found a vcf as an attachment. That’s why I prefer this way :)

          – fauve
          Jan 13 '14 at 17:36






          Thank you for vcf-to-mutt and muttquery. I will try them. Yes, I can use a link to my vcf but some email program sync automatically the addressbook when they found a vcf as an attachment. That’s why I prefer this way :)

          – fauve
          Jan 13 '14 at 17:36














          Vcf-to-mutt is an interesting script. Thank you o/ but it doesn’t resolve my problem :) Perhaps the solution are very complicated. Then as you tell me I will probably forget this idea and only quote the link to my vcard in a signature. Thank you.

          – fauve
          Jan 16 '14 at 18:25






          Vcf-to-mutt is an interesting script. Thank you o/ but it doesn’t resolve my problem :) Perhaps the solution are very complicated. Then as you tell me I will probably forget this idea and only quote the link to my vcard in a signature. Thank you.

          – fauve
          Jan 16 '14 at 18:25














          updated alias solution

          – user55518
          Jan 16 '14 at 19:19





          updated alias solution

          – user55518
          Jan 16 '14 at 19:19

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f108916%2fautomatically-attach-a-file-to-a-mail-with-mutt%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown






          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay