Answered by:
Getting entire email message body

Question
-
I'm trying to get the full body contents, and I've been led down the path of having to use the makeEwsRequestAsync method in conjunction with the GetItem method from EWS:
http://msdn.microsoft.com/en-us/library/office/aa566013.aspx
Although I can use mailbox.item.itemId ton construct the GetItem XML, I don't know where to get the ChangeKey value from. Any ideas?
(what's also odd is that the GetItem documentation doesn't include ChangeKey as a required parameter, but it certainly looks like it is required, unless I'm missing something...)
Eric Legault MVP (Outlook)
About me...
Outlook Appins: Store Social Media fields in your Outlook Contacts!Wednesday, January 16, 2013 1:23 AM
Answers
-
You do not need to call GetItem method with ChangeKey. Just do not even add that attribute. The return request will contain then both fields under <ItemId Id=... ChangeKey=... &>
Example:
'<GetItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"' + ' xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">' + ' <ItemShape>' + ' <t:BaseShape>Default</t:BaseShape>' + ' <t:AdditionalProperties>' + ' <t:FieldURI FieldURI="item:Body"/>' + ' </t:AdditionalProperties>' + ' </ItemShape>' + ' <ItemIds>' + ' <t:ItemId Id="' + Id + '" />' + ' </ItemIds>' + '</GetItem>';
Anze Javornik
- Edited by Anze Javornik Thursday, January 17, 2013 12:18 AM
- Marked as answer by Eric Legault [MVP - Office Apps and Services]MVP Thursday, January 17, 2013 5:10 PM
Wednesday, January 16, 2013 10:03 PM
All replies
-
You do not need to call GetItem method with ChangeKey. Just do not even add that attribute. The return request will contain then both fields under <ItemId Id=... ChangeKey=... &>
Example:
'<GetItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"' + ' xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">' + ' <ItemShape>' + ' <t:BaseShape>Default</t:BaseShape>' + ' <t:AdditionalProperties>' + ' <t:FieldURI FieldURI="item:Body"/>' + ' </t:AdditionalProperties>' + ' </ItemShape>' + ' <ItemIds>' + ' <t:ItemId Id="' + Id + '" />' + ' </ItemIds>' + '</GetItem>';
Anze Javornik
- Edited by Anze Javornik Thursday, January 17, 2013 12:18 AM
- Marked as answer by Eric Legault [MVP - Office Apps and Services]MVP Thursday, January 17, 2013 5:10 PM
Wednesday, January 16, 2013 10:03 PM -
Good to know, thanks Anze. I haven't had a chance to try anything so far, due to my continous problems getting a Mail App to start (most likely due to authentication confusion; see one of my other posts).
Eric Legault MVP (Outlook)
About me...
Outlook Appins: Store Social Media fields in your Outlook Contacts!Thursday, January 17, 2013 5:10 PM