【问题标题】:How can I get the mailbox email details from Exchange Server for a user which don't have default mailbox (I have no default mailbox)?如何从 Exchange Server 获取没有默认邮箱(我没有默认邮箱)的用户的邮箱电子邮件详细信息?
【发布时间】:2018-11-11 12:11:06
【问题描述】:

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

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

我想知道如何访问它。

我读到了一些与模拟或委托有关的内容。

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

  • 如何获取分配给用户的邮箱数量?
  • 如何获取用户的特定邮箱电子邮件?

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

 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);

我能做什么?

【问题讨论】:

  • Exchange 管理员应向您委派访问权限。
  • 什么错误?您的代码正是它应该的样子,所以我们无法以编程方式帮助您。你能验证@SergeyVaulin 的评论吗?你有权限吗?

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


【解决方案1】:

嗯,我使用 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);

希望对你有帮助

【讨论】:

  • 会检查这个。
猜你喜欢
  • 1970-01-01
  • 2014-04-14
  • 2018-04-28
  • 1970-01-01
  • 1970-01-01
  • 2012-11-26
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多