How to get the sender of an e-mail in EWS MAPI?

ⅰ亾dé卋堺 提交于 2019-12-23 13:00:55

问题


I'm accessing all e-mails from Exchange Server by code using the EWS Managed API. I loop 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 don't know how to access the property that has the information. Any help is appreciated.


回答1:


This was my solution:

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

After loading the item I just casted it to EmailMessage to get access to the properties and methods.



来源:https://stackoverflow.com/questions/5233461/how-to-get-the-sender-of-an-e-mail-in-ews-mapi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!