【发布时间】:2012-09-21 01:18:27
【问题描述】:
我正在尝试使用 Exchange Web Services Managed API 连接到组邮箱并从其收件箱返回电子邮件。我可以使用我的个人电子邮件帐户这样做,但使用组邮箱却没有成功。我可以访问 Outlook 中的组邮箱。我包含了用于从组邮箱中选择电子邮件的代码。我不确定 URI 应该是什么样子,所以我尝试了两种不同的格式。
https://server3.mycompany.com 返回以下错误。
请求失败。远程服务器返回错误:(405) Method Not Allowed。
和https://server3.mycompany.com/EWS/Exchange.asmx 从未返回并超时。
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2007_SP1);
service.UseDefaultCredentials = true;
\\service.Url = new Uri("https://server3.mycompany.com");
service.Url = new Uri(@"https://server3.mycompany.com/EWS/Exchange.asmx");
Mailbox gpmailbox = new Mailbox("CouponInterfacePool@mycompany.com");
FolderId gpInbox = new FolderId(WellKnownFolderName.Inbox, gpmailbox);
ItemView view = new ItemView(10);
FindItemsResults<Item> results = service.FindItems(gpInbox, view);
【问题讨论】:
标签: exchangewebservices exchange-server-2007