EWS API 1.1: Problem with loading a special ItemAttachment RRS feed

  • Question

  • Hi All:

    version: ExchangeVersion.Exchange2007_SP1

    SDK:EWS API 1.1

    When I read an attachment described like this:<img src="cid:22745135-8e82-40d6-9a0f-18492d70fa56"> . this attachment type is identified  as an ItemAttachment object ,but all to the necessary properties( such as ItemAttachment.Item,ItemAttachment.Name) is null except Id property.
    How should I read this type of attachment.

    My Code:

     foreach (Attachment attach in email.Attachments)
                    byte[] content = null;
                    bool isfileAttachment = false;
                    if (attach is FileAttachment)
                        FileAttachment fileAttach = attach as FileAttachment;
                        content = fileAttach.Content;
                        isfileAttachment = true;
                    else if (attach is ItemAttachment)
                        ItemAttachment itemAttach = attach as ItemAttachment;
                        if (itemAttach != null)
                            itemAttach.Load(new PropertySet(ItemSchema.MimeContent));
                            content = itemAttach.Item.MimeContent.Content;

    Can anyone give me some help about reading this type of attachment.

    Thank you very much!

    Thursday, March 31, 2011 7:27 AM

All replies