0 votes

Please help me to open CID attachments

by

1 Answer

0 votes

There is no such thing as a CID attachment.

"cid:" protocol is used by HTML body of the message to reference images/resources attached to the message.

It specifies Content-ID of the image/resource that should be used.

For example this HTML:

  <img src="cid:logo@example.com" />

...references an image, attached to the message. The image is stored as a part of the MIME tree, in most cases related to HTML body part.

It has a Content-Disposition header set to inline and Content-Id header set to logo@example.com.

You can use IMail.Attachments[string contentId] to find attachment by Content-ID:

IMail email = ...;
MimeData attachment = email.Attachments["logo@example.com"];
by (298k points)
...