You are hereBlogs / MelissaNava's blog / EWS Programming and the From Email Address

EWS Programming and the From Email Address


By MelissaNava - Posted on 06 January 2009

The first place that you might think that the From email would be is the inboxItem, that's the first place I looked. You'll quickly find that the From Email is not in there. Here is how you access the From email address in EWS:

// C#
string strEmail;
SingleRecipientType getFromEmailAddress = ((ExchangeWebServices.MessageType)(getItemResponseMessage.Items.Items[0])).From;
strEmail = getFromEmailAddress.Item.EmailAddress;

Happy Coding!