0
votes

I use Exchange Web Service Managed API to access my mailbox in the server. I can display the body of each EmailMessage, but if a message contains images I can't get them. I've heard about MIME but don't know how to use it, does someone know how MIME works in EWS MAPI?

Any help is appreciated. Thank you in advance!

This is the code I use to acces EmailMessages:

        FindItemsResults<Item> findResults = service.FindItems(WellKnownFolderName.Inbox,
            new ItemView(100));
        foreach (EmailMessage item in findResults.Items)
        {
            item.Load();
            if (!list.Contains(item.Id.UniqueId))
            {
                DataRow dr = dt.NewRow();
                dr["OutlookID"] = item.Id.UniqueId;
                dr["Onderwerp"] = item.Subject;
                dr["Omschrijving"] = item.Body;
                dr["Meldingsdatum"] = item.DateTimeSent;
                dr["Melder"] = ad.GetLoginName(item.Sender.Name);
                dt.Rows.Add(dr);


            }
1

1 Answers

2
votes

Based on the code you have, you can access them in item.Attachments

Each image is an attachment.