Obtaining an e-mail item's from or senders e-mail address after GetItem call RRS feed

  • Question

  • I've used EWS to get all e-mail items in a mailbox, I'm then making a call to GetItem to get the full properties of each e-mail bu I need to get to the senders actual e-mail address.

    GetItemType getItemRequest = new GetItemType(); getItemRequest.ItemShape = new ItemResponseShapeType(); getItemRequest.ItemShape.BaseShape = DefaultShapeNamesType.AllProperties; getItemRequest.ItemIds = new ItemIdType[1]; getItemRequest.ItemIds[0] = (BaseItemIdType)inboxItem.ItemId; GetItemResponseType getItemResponse = esb.GetItem(getItemRequest); ItemInfoResponseMessageType getItemResponseMessage =

    getItemResponse.ResponseMessages.Items[0] as ItemInfoResponseMessageType; if (getItemResponseMessage != null) { if (getItemResponseMessage.ResponseClass == ResponseClassType.Success && getItemResponseMessage.Items.Items != null && getItemResponseMessage.Items.Items.Length > 0) { inboxItem = getItemResponseMessage.Items.Items[0];

    At this point in the debugger I can drill down thru inboxItem and get to From.Item.EmailAddress and see the senders e-mail address but I cannot get to this value within the code, see Watch image below;

    Can anyone advise what the correct function calls are to get the senders e-mail address?
    Wednesday, April 17, 2013 9:56 PM