Howto: Example to retrieve the body property of a message using the Exchange Managed API.

        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;

        }