Forgive me monks for asking a silly question but I can't seem to find an answer anywhere on this site or google.

I'm writing yet another web-mail client to learn and because I need something more customizable than what I'm finding already availiable. So far things have gone pretty well but I'm having trouble displaying inline images. When I receive an HTML email I try to parse it and map any images that have src="cid:<something here>" to the actual filename that is attached to the email. The problem is that the cid field doesn't seem to contain the actual filename rather, what looks like a hex string with some dollar signs etc. I assume that this information is with the actual attachment somewhere but I can't seem to figure out how to get it. I'm using MIME::Parser to parse the emails and the only filename information I can seem to get is:

$entity->recommended_filename(); # gets the real file-name

Or:
$entity->bodyhandle()->path(); # gets the internal name used by MIME:: +Parser in the tmp directory

Can someone tell me what I'm missing?

Thanks in advance!

Lobster Aliens Are attacking the world!

In reply to Translating cid: image src to real filename by cfreak

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.