<<< Date Index >>>     <<< Thread Index >>>

Re: Export HTML emails with images



* Bertrand Janin on Friday, February 27, 2009 at 09:56:59 -0500
> I work in a company using mainly HTML emails. They format their mails
> and from time to time insert screenshots and images to illustrate their
> point. While I obviously disagree with the process, I am not in position
> to change that right now.
> 
> The text version generated by their thunderbirds is good 95% of the time
> and mutt serves me well. But I still receive this email from time to
> time with screenshots and formatting in a specific order. It is rare but
> I hate to juggle between firefox, mutt and an image viewer.
> 
> I tried to search quickly for solutions to 'export' the mail with its
> image attachment so it can be viewed as-is in firefox, with the images
> at the right place. I tried to fiddle with 'metamail' but without
> success, 'uudecode' doesn't find anything... 
> 
> I can probably write a script to handle this kind of situation, but
> before I code a square wheel I'd like to know if someone out there ever
> accomplished this.

Shamelessly plugging my muttils package (needs Python >= 2.4):

http://www.blacktrash.org/hg/muttils/

You can use its viewhtmlmsg command in a macro:

macro index,pager <F7> "\
<enter-command> set my_wait_key=\$wait_key wait_key=no<enter>\
<pipe-message>viewhtmlmsg<enter>\
<enter-command> set wait_key=\$my_wait_key &my_wait_key<enter>\
" "view HTML in browser"

macro index,pager <F8> "\
<enter-command> set my_wait_key=\$wait_key wait_key=no<enter>\
<pipe-message>viewhtmlmsg -s<enter>\
<enter-command> set wait_key=\$my_wait_key &my_wait_key<enter>\
" "view HTML (safe) in browser"


c
-- 
\black\trash movie    _C O W B O Y_  _C A N O E_  _C O M A_
Ein deutscher Western/A German Western
-->> http://www.blacktrash.org/underdogma/ccc.html
-->> http://www.blacktrash.org/underdogma/ccc-en.html