Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
public string GetMessageBody(Item oItem, BodyType oBodyType)
{
string sRet = string.Empty;
PropertySet oPropSet = new PropertySet(PropertySet.FirstClassProperties);
oItem.Load(PropertySet.FirstClassProperties);
PropertySet oPropSetForBodyText = new PropertySet(PropertySet.FirstClassProperties);
oPropSetForBodyText.RequestedBodyType = oBodyType;
oPropSetForBodyText.Add(ItemSchema.Body);
Item oItemForBodyText = Item.Bind((ExchangeService)oItem.Service, oItem.Id, (PropertySet)oPropSetForBodyText);
oItem.Load(oPropSetForBodyText);
sRet = oItem.Body.Text;
return sRet;
}