使用.net从Outlook Web App读取邮件

时间:2017-04-17 15:27:03

标签: c# .net email outlook outlook-web-app

我的代码适用于Office 365 Exchange Web服务https://outlook.office365.com/EWS/Exchange.asmx。但是我现在正试图从Outlook网络应用程序中读取邮件https://mail.company.com/owa

ExchangeService exchangeService = new ExchangeService(ExchangeVersion.Exchange2013);
exchangeService.Credentials = new NetworkCredential(i_EmailID, i_Password);
exchangeService.Url = new Uri(exchangeURL);
exchangeService.KeepAlive = true;
Mailbox mailbox = new Mailbox(email);
FolderId folder = new FolderId(WellKnownFolderName.Inbox, mailbox);
ItemView view = new ItemView(1);
FindItemsResults<Item> items = exchangeService.FindItems(folder, view);

如果此代码仅适用于Exchange Web Service,那么我应该使用什么方法来访问Outlook Web Access?

请与我分享任何可以帮助我理解实施此内容的文章或代码示例。

0 个答案:

没有答案