Hi, thank you for your 3 responses. I've gone through your texts and those are interesting and helpful.
I do use a browser to read the html part when needed, like Grant and Andreas said. I press <Enter> to call w3m to view it. It's good for most of the cases, showing images as well if they are remote URLs. If it's not good enough, I press 'w'(a macro) to call Google Chrome to view it. It does a better job. However, in this case I mentioned, it's about a message EMBEDDING many INLINE images, which are not visible to the browsers. Why? Because the images are not saved to the filesystem together with the HTML part. A GUI mail client like Thunderbird does be able to deal with such a message and display the html message with those inline images inserted in the right places. This is why I have to save the WHOLE message and ask a mail client to look at it. Christian's solution looks like doing the job I need, because it feeds the MESSAGE to the viewhtmlmsg. Thank you. I like Python and expect to see it more (Most of the time I code in Perl). I'll give it a try, and report it later. (Googling 'viewhtmlmsg', I found some previous relevant discussions.) thanks, charlie On Sat, Sep 04, 2010 at 12:59:36PM +0100, Christian Ebert wrote: > * Charles Jie on Saturday, September 04, 2010 at 18:40:43 +0800 > > I've been using mutt for 7 years. From time to time, such idea may flash > > in my brain. > > > > I can read most of my daily mail with mutt without problem. > > > > But sometimes some friends may send me an html mail with pretty rich > > inline images. Such embedded images need to be seen in right > > context (there are related text arround them). > > > > My current practice is bouncing the mail to another user in my linux > > box, and launch Thunderbird to get and read it. > > > > I'm wondering if it is possible for my mutt to copy the message to a > > temporary mbox file, and launch a GUI mail viewer to view it. (the way a > > little like what we do about attachment) > > > > I've checked Thunderbird's command line usage. It accepts a URL > > (thunderbird -mail URL) but it doesn't treat it as mbox (but raw > > text). > > > > Any idea or experience? > > Shameless plug: > > If you're not afraid of Python, you could try viewhtmlmsg of my > muttils bundle. It seems to do what you want. > > $ viewhtmlmsg -h > Usage: viewhtmlmsg [options] > > Displays html message read from stdin. $BROWSER environment may be overridden > with option "-b". > > Options: > --version show program's version number and exit > -h, --help show this help message and exit > -s, --safe view html w/o loading remote files > -k KEEP, --keep=KEEP remove temporary files after KEEP seconds (0 for > keeping files) > -b APP, --browser=APP > prefer browser APP over $BROWSER environment > > But it is mainly meant to be used from within Mutt via a macro: > > # call viewhtmlmsg from 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 On Sat, Sep 04, 2010 at 02:58:38PM +0200, Andreas Kalex wrote: > > * Charles Jie <ch...@keya.com.tw> wrote on 04.09.2010 at 12:50: > > > > My current practice is bouncing the mail to another user in my linux > > box, and launch Thunderbird to get and read it. > Why don't use a browser to open a html mail? > I use "v" to see the attachments of the mail, and scroll to the one which has > text like this: > " [text/html, quoted, iso-8859-1, 41K]" on the right side. Now it depends on > the entries in mailcap which program is to open. > > Andreas On Sat, Sep 04, 2010 at 01:03:52PM +0000, Grant Edwards wrote: > > I use Firefox instead of Thunderbird. In my .mailcap file I have this > entry: > > text/html; links -force-html -dump %s; copiousoutput; print = firefoxurl %s; > > That uses "links" to render html by default. If that's not good > enough, I hit "p" in mutt to "print" the html, and that lauches > firefox using this script: > > ---------------------------------firefoxurl--------------------------------- > #!/bin/bash > set -x > MRC="mozilla-xremote-client -a firefox" > URL="$1" > if $MRC 'ping()' 2>/dev/null ; then > $MRC "openURL($URL,new-tab)" > else > firefox "$URL" > fi > ---------------------------------------------------------------------------- > > I know that's not quite what you're asking for, but maybe it's a start. > > If that's not good enough, then I just launch Thunderbird manually > (which is set up to use the same IMAP server that mutt is using).