Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to view in-line images sent with HTML attachments?

969 views
Skip to first unread message

Mark S Bilk

unread,
Jul 7, 2008, 9:14:52 PM7/7/08
to
Sorry if this is a FAQ but I have googled and rtfm'ed and can't
find an answer.

I frequently receive e-mails that contain an HTML attachment
accompanied by one or more attached image files that are
meant to be in-lined within the HTML. Each image is
referenced in the HTML by a URL such as:

cid:_...@Foxmail.net

in an IMG tag like this:

<IMG id=_x0000_i1025 height=450 src="cid:_...@Foxmail.net" width=600>

which corresponds to headers for the image file such as:

Content-Type: image/jpeg;
name="2211A95FA0734E5082CB215B396AC4991.JPG"
Content-Transfer-Encoding: base64
Content-ID: <_...@Foxmail.net>
[the base64-encoded image data follows here]

The "cid:" URL matches up with the "Content-ID:" header.

I've put an example of such an e-mail on my website here:

http://cosmicpenguin.com/test/test3

If you download the file test3 with, e.g., wget, you can
view it with mutt using the command "mutt -f test3".
In this message the HTML attachment is also base64 encoded,
but usually it's not.

Using the mutt "v" command, I can view the HTML attachment,
but the images don't appear within it. (I can view the
images separately.)

Is there any way within mutt to view such HTML attachments
with the images properly in-lined inside them?

Or has anyone created an add-on program that can be used
with mutt to do it?

Thanks in advance,

Mark


Christian Ebert

unread,
Jul 9, 2008, 7:34:40 AM7/9/08
to
* Mark S Bilk on Tuesday, July 08, 2008:

You can try out "viewhtmlmsg" which is part of my python muttils
package at <http://www.blacktrash.org/hg/muttils/>.

Be aware that there might be security issues with cid "urls".

c
--
Was heißt hier Dogma, ich bin Underdogma!
[ What the hell do you mean dogma, I am underdogma. ]

_F R E E_ _V I D E O S_ -->> http://www.blacktrash.org/underdogma/

Mark S Bilk

unread,
Jul 9, 2008, 10:34:19 PM7/9/08
to
On Jul 9, 4:34 am, Christian Ebert <blacktr...@gmx.net> wrote:
> * Mark S Bilk on Tuesday, July 08, 2008:
>
> > I frequently receive e-mails that contain an HTML attachment
> > accompanied by one or more attached image files that are
> > referenced in the HTML by a URL such as:
> > cid:_...@Foxmail.net
>
> You can try out "viewhtmlmsg" which is part of my python muttils
> package at <http://www.blacktrash.org/hg/muttils/>.

Thanks!! It's time I learned a little python. Or I can try the
original shell script.

> Be aware that there might be security issues with cid "urls".

If I use, e.g., Firefox to view the modified html, then it should be
as secure as viewing a web page with embedded images, which
we do all the time. Presumably Firefox is secure against
embedding something nasty. So as long as the cid url matches
some actual attachment in the message it should be OK.
Or am I missing something?

0 new messages