Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 234
Tassisto Avatar asked Feb 25 '23 21:02

Tassisto


1 Answers

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.

like image 190
Tassisto Avatar answered Mar 05 '23 15:03

Tassisto