如何在C#中使用EWS托管API订购电子邮件

时间:2016-06-16 09:50:20

标签: c# asp.net exchangewebservices ews-managed-api

我想通过使用C#的EWS托管API填充的日期时间/发件人/主题电子邮件进行排序。我正在填写下面的电子邮件 -

ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013_SP1);
 var itemView = new ItemView(pageSize, offset, OffsetBasePoint.Beginning);
 FindItemsResults<Item> fiitems = null;
 fiitems = service.FindItems(new FolderId(WellKnownFolderName.Inbox, userMailbox), itemView);
 service.LoadPropertiesForItems(fiitems.Items, PropertySet.FirstClassProperties);

任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:2)

ItemView view = new ItemView(10, 0, OffsetBasePoint.Beginning);
view.OrderBy.Add(EmailMessageSchema.Subject, SortDirection.Ascending);