I need to fetch multiple o365 mail details for different mail ids using EWS managed API in c#. Suppose I have o365 mail ids like 1,2,3...
When I will pass these mail ids and call EWS managed API then the details for mail ids should populated. I have done the details population for a single email id using the code like below:
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013_SP1);
service.Credentials = new WebCredentials("username", "Password");
service.AutodiscoverUrl(Ownerusername, RedirectionUrlValidationCallback);
EmailMessage mail = EmailMessage.Bind(service, mailID, PropertySet.FirstClassProperties);
If anybody has any suggestion please share.
Try this: