How to get email sender in EWS MAPI?

I access all Exchange Server emails by code using the EWS Managed API. I iterate over all the items in the mailbox and load them:

item.Load()

I need to know the sender of the item / e-mail message. But I do not know how to access a property that has information. Any help is appreciated.

+4
source share
1 answer

This was my solution:

 EmailMessage mes = (EmailMessage)item; TextBox1.Text = mes.Sender.Name; 

After downloading the item, I simply clicked it on EmailMessage to access the properties and methods.

+8
source

Source: https://habr.com/ru/post/1342826/


All Articles