mailcap command run even when not using auto_view
Hello. I've configured mutt to view .xlsx attachments inline if they're not too big. Here is my configuration: ~/.mailcap: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; ssconvert --export-type=Gnumeric_stf:stf_csv '%s' fd://1 2> /dev/null | column -s, -t; copiousoutput; description="Microsoft Excel Spreadsheet"; nametemplate=%s.xlsx ~/.muttrc: message-hook ~A "source ~/.mutt/message_default.rc" message-hook "~z <500K" "auto_view application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ~/.mutt/message_default.rc: unauto_view application/vnd.openxmlformats-officedocument.spreadsheetml.sheet It works quite well, except that when I open a message with big attachments, .xlsx files are not displayed inline (as expected), but the mailcap command is still run. I can see that with "top". So I have to wait for a long time before I can see message's body, which defeats the purpose of the message-hook. Is it possible possible to avoid that? Did I do something wrong? -- Bernard Massot
Help with mutt - sending mail with body as html with attachments
I am trying to use mutt to send emails with the following characteristics: 1. Mail whose content is html - I can do this by specify -e "my_hdr Content-Type: text/html", and formatting the message as a pure html file, e.g. no extra headers. 2. Mail whose content is html, but must all support attachments. I also need be able to send emails from the command line. There is a further constraint that I have to use mull v. 1.2.5.1i It does not seem possible to use mutt to achieve this. If I specify the -e "my_hdr ..." and the -a option within the same email, the ultimate header received in the email at the recipient contains Content-Type: text/html which isn't correct, mutt should have used: Content-Type: multipart/mixed; boundary="45Z9DzgjV8m4Oswq" If I don't specify the -e, then the section with the message, which is html, is formatted as this: Content-Type: text/plain; charset=us-ascii Content-Disposition: inline If I try to invoke mutt like this: -e "my_hdr Content-Type: text/html" \ -e "my_hdr Mime-Version: 1.0" \ -e "my_hdr Content-Type: multipart/mixed; boundary=\"IS0zKkzwUGydFO0o\"" \ -e "my_hdr Content-Disposition: inline" \ mutt throws an error Error in command line: boundary=IS0zKkzwUGydFO0o: unknown commandS If I try formatting a complete email and use the -H option with mutt, mutt strips out the multipart/mixed boundary line. Why? So, is it possible to specify the Content-Type: header inside a multipart mime email with mutt? Thanks for any help.
Re: Help with mutt - sending mail with body as html with attachments
Hello Cary, > 1. Mail whose content is html - I can do this by specify -e "my_hdr > Content-Type: text/html", and formatting the message as a pure html > file, e.g. no extra headers. I’m not entirely sure but I feel that it’s not too ideal to set the Content-Type via a my_hdr setting. Maybe you can set a custom header like “x-change-to-html”, and apply a hook running an macro if this header is present? Sounds more native to me. Regards, P.M.
Re: Help with mutt - sending mail with body as html with attachments
Hello again, > Maybe you can set a custom header like “x-change-to-html”, and apply a > hook running an macro if this header is present? > Sounds more native to me. Maybe this is even easier: mutt -e 'set content_type="text/html"' -s 'Subject of your msg' spamreceipi...@server.gov -a attachment.pdf < message.html Regards, P.M.