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

This is a discussion on How to view in-line images sent with HTML attachments? within the Mutt forums in Other Technologies category; 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:__0 @ Foxmail.net in an IMG tag like this: <IMG id=_x0000_i1025 height=450 src="cid:__0 @ 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: <__0 @ Foxmail.net> [the base64-encoded image data follows here] The "cid:" URL matches ...

Go Back   Application Development Forum > Other Technologies > Mutt

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 07-07-2008, 09:14 PM
Mark S Bilk
Guest
 
Default How to view in-line images sent with HTML attachments?

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:__0@Foxmail.net

in an IMG tag like this:

<IMG id=_x0000_i1025 height=450 src="cid:__0@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: <__0@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


Reply With Quote
  #2  
Old 07-09-2008, 07:34 AM
Christian Ebert
Guest
 
Default Re: How to view in-line images sent with HTML attachments?

* 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
> meant to be in-lined within the HTML. Each image is
> referenced in the HTML by a URL such as:
>
> cid:__0@Foxmail.net
>
> in an IMG tag like this:
>
> <IMG id=_x0000_i1025 height=450 src="cid:__0@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: <__0@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?


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/
Reply With Quote
  #3  
Old 07-09-2008, 10:34 PM
Mark S Bilk
Guest
 
Default Re: How to view in-line images sent with HTML attachments?

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?

Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 05:01 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.