
Why doesn't FindItem return the message body?
The process for getting the message body is not intuitive because of how the Exchange Web Services proxy objects are created. The naming conventions don't help, either. Most developers use FindItem with an AllProperties BaseShape to return all the items in the folder, then enumerate through the items returned, expecting the message body to be one of the properties.
That process would work very well if FindItem with an AllProperties BaseShape actually returned the message body — but, to minimize the resource usage of FindItem, it doesn’t. AllProperties in a FindItem call does not return all the properties attached to an item. Large binary objects or text properties such as the Body, and calculated properties (those whose value depends on other properties), are not returned in a FindItem call.
Actually, the AllProperties BodyShape in a GetItem call doesn’t return all the properties set on an item, either. It returns all the properties that we have mapped in our schema. Believe me — we’re beginning to regret our choice of naming there!
But don’t worry, there is a way to retrieve the message body — it just involves a few extra steps. See the code example that follows for the inside scoop!
You can also retrieve the body summary in a GetItem call. An interesting post (Accessing Web service URL) on the Exchange Server Development TechNet Forum discussed this.