OfficeDev / ews-managed-api

Other
585 stars 319 forks source link

Unable to download reference attachment #142

Open rsrini83 opened 6 years ago

rsrini83 commented 6 years ago

Hi,

Using OWA interface created a reference attachment mail, however when downloading the mail using EWS, however, HastAttachments flag is set to True and Attachments collections count is zero. Used the below query to load the attributes,

PropertySet propSet = new PropertySet(BasePropertySet.FirstClassProperties, ItemSchema.HasAttachments, ItemSchema.NormalizedBody, ItemSchema.Attachments, ItemSchema.Categories, ItemSchema.InternetMessageHeaders, ItemSchema.AllowedResponseActions, ItemSchema.InReplyTo);

Please guide me how to download this.

Btw, in EWS response i didnt find any attachment tags which is captured via EWS trace.

davster commented 6 years ago

Turn on response tracing and paste in the response XML document that shows the missing attachments.

rsrini83 commented 6 years ago

EWS.log

Here is the log which contains all request, responses.

davster commented 6 years ago

If I am looking at the right responses, it looks like from the body of the email that these are reference attachments, right?

rsrini83 commented 6 years ago

Yes, I added as reference attachment using OWA. However, I don't see Attachment collection in the response.

rsrini83 commented 6 years ago

Am i doing right or Is there another way to download ReferenceAttachment ?

rsrini83 commented 6 years ago

Hello David,

Any update on this issue?

davster commented 6 years ago

Try using <t:RequestServerVersion Version="Exchange2015" or greater - reference attachments are not supported for 2013 requests.