Closed douglasheld closed 9 years ago
You'll probably need to configure the PropertySet
you want to retrieve on the ItemView
object.
I would appreciate if you could show how that is done. I did not have very good luck with taking out the PropertySet, adding more ItemSchema.* properties to it, and then putting it back in the ItemView.
There's an example in the Getting Started Guide.
Thank you. That is the original example I was following. I did not have any luck with the following customization of PropertySet to try to return the elements I want (e.g. From: and To: email headers)
I would appreciate if you could show how that is done. I did not have very good luck with this:
...
PropertySet fields = new PropertySet();
fields.add( ItemSchema.InternetMessageHeaders );
top1000.setPropertySet( fields );
FindItemsResults<Item> result = inbox.findItems( top1000 );
...
you can use PropertySet fields = new PropertySet(ItemSchema.Id,EmailMessageSchema.From, EmailMessageSchema.ToRecipients)
(extend this list with the additional properties you want to load) also a taken hint from msdn
To get the message headers, the EWS schema exposes the InternetMessageHeaders first-class property. Unfortunately, this property does not appear to return a complete set of message headers. For example, in Exchange 2010 Service Pack 1 (SP1), the InternetMessageHeaders property doesn't return address headers such as From and To
Hi all,
Following the instructions to retrieve a message list does not include essential details like from email From: and To: fields. It seems like the "friendly names" are included, but these of course are not email addresses.
The following code lists my Inbox messages, but the getToRecipients() is always 0 elements; the getFrom().getAddress() is always null; and getInternetMessageHeaders() is also null.
How can I specify the fields I want in the result?