basically create a new propertyset with the schema you need to retrieve, and then set the 'RequestedBodyType' of the 'propertyset' to 'BodyType.Text'
code example:
PropertySet myPropertySet = new PropertySet(
ItemSchema.Importance,
ItemSchema.Subject,
ItemSchema.Body,
ItemSchema.DateTimeReceived,
ItemSchema.HasAttachments,
EmailMessageSchema.From,
EmailMessageSchema.ToRecipients,
EmailMessageSchema.DisplayTo
);
myPropertySet.RequestedBodyType = BodyType.Text;
service.LoadPropertiesForItems(findResults.Items, myPropertySet);
foreach (Item myItem in findResults.Items)
{
//etc
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment