login about faq

I have an email message that contains an embedded image.

The image in the email has a Content-ID and this content ID is referred in the body's html so this should come under the "related data" category, Chilkat handles it as an "attachment".

Why is this the case?

asked Dec 19 '16 at 10:27

chilkat's gravatar image

chilkat ♦♦
12.5k317361455


A "related item" is an image or other MIME sub-part that is contained within the multipart/related enclosure. I've had a look at the .eml you sent to me in private email, and it has the following MIME structure:

multipart/mixed
    multipart/alternative
        text/plain
        text/html
    image/png

The image is contained in the multipart/mixed enclosure (which is the typical place where attachments are located), and there is no multipart/related enclosure.

For example, a typical email that contains a multipart/related image referenced from HTML, and also has an attachment, would look like this:

multipart/mixed
    multipart/alternative
        text/plain
        multipart/related
            text/html
            image/jpeg
    application/pdf

PS> It's not feasible for Chilkat to be trying to parse the HTML body to determine if a particular image is "related" or not. The decision is based on the location of the image within the MIME structure.

link

answered Dec 19 '16 at 10:32

chilkat's gravatar image

chilkat ♦♦
12.5k317361455

Here's another example of an email with incorrect structure, where the HTML images are not properly placed inside a multipart/related enclosure, and are instead located where attachments should be..

multipart/mixed
    multipart/alternative
        text/plain
        text/html
    application/postscript
    application/pdf
    application/postscript
    application/x-zip-compressed
    application/octet-stream
    image/jpeg
    image/jpeg
    image/png
    image/jpeg
    image/png

link

answered Dec 21 '16 at 15:32

chilkat's gravatar image

chilkat ♦♦
12.5k317361455

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×27
×3
×2

Asked: Dec 19 '16 at 10:27

Seen: 390 times

Last updated: Dec 21 '16 at 15:32

powered by OSQA