c# - 对于没有默认邮箱的用户(我没有默认邮箱),如何从 Exchange Server 获取邮箱电子邮件详细信息?

标签 c# exchange-server exchangewebservices exchange-server-2010

您好,我想访问分配给我的邮箱的电子邮件,但它不是我在 Exchange Server 中的主邮箱。

我能够获得分配给我的邮箱服务器的详细信息,但我有一个没有邮箱的用户。

我想知道如何访问它。

我阅读了与模拟或委托(delegate)相关的内容。

这不起作用,因为新用户没有主邮件。

  • How can I get how many mailbox assign to the user?
  • How can I get particular mailbox email for a user?

我能够访问我的邮箱,但是当我尝试访问没有主邮箱的用户的邮箱时,我无法访问。

 ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010);
        service.Credentials = new WebCredentials("user-name", "password", "domain");
        //Autodiscover end point
        service.Url = new System.Uri("https://exchange-url/EWS/Exchange.asmx");
        FolderId SharedMailbox = new FolderId(WellKnownFolderName.Inbox, "maibox-name");
        ItemView itemView = new ItemView(1000);
        service.FindItems(SharedMailbox, itemView);

我能做什么?

最佳答案

好吧,我使用 Independentsoft.Exchange 找到了解决此问题的有趣方法。友情链接 here .下面是代码

 NetworkCredential credential = new NetworkCredential("username", "password");
 Service service = new Service("https://exchange-url/EWS/Exchange.asmx", credential);
 Independentsoft.Exchange.Mailbox mailbox = new Independentsoft.Exchange.Mailbox("MysecondEmail@mydomain.com");
 StandardFolderId InboxFolder = new StandardFolderId(StandardFolder.Inbox, mailbox);

希望对你有帮助

关于c# - 对于没有默认邮箱的用户(我没有默认邮箱),如何从 Exchange Server 获取邮箱电子邮件详细信息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50641933/

相关文章:

c# - 启动多个线程时 Silverlight 应用程序没有响应

exchange-server - Exchange Web服务: Finding emails sent to a recipient

exchangewebservices - Exchange Web 服务问题 : "Soap client returned status of 401" in PHP

c# - 我们需要检查 Exchange 上的哪些设置以避免抛出 ServiceRequestException?

soap - 在一次 'syncFolderItems' 操作中监控多个文件夹?

c# - C# 中的 Google 地球插件

c# - .NET Framework - 可能的内存泄漏类?

delphi - 在 MS Exchange Server 2007 中使用 [delphi] MadExcept 错误处理

c# - 怀特如何处理已经运行的应用程序?

mysql - 如何在 MySQL 和 Parse.com 之间交换数据?