【问题标题】:ExchangeVersion for MS exchange server 2013 not found未找到 MS Exchange Server 2013 的 ExchangeVersion
【发布时间】:2017-11-28 10:03:06
【问题描述】:

为了监控 MS Exchange Server 2013 上的电子邮件帐户,我使用的是 ews-java-api 2.0 版。我正面临这个 api 的一个问题。 GitHub 中源代码的状态为the api is outdated。事实上,ExchangeVersion 枚举的源代码并不包含 2013 & 2016 的最新版本:

package microsoft.exchange.webservices.data.core.enumeration.misc;

/**
 * Defines the each available Exchange release version.
 */
public enum ExchangeVersion {

  // / Microsoft Exchange 2007, Service Pack 1
  /**
   * The Exchange2007_ s p1.
   */
  Exchange2007_SP1,
  // / Microsoft Exchange 2010
  /**
   * The Exchange2010.
   */
  Exchange2010,

  /// Microsoft Exchange 2010, Service Pack 1
  /**
   * Exchange2010_SP1.
   */
  Exchange2010_SP1,

  // Microsoft Exchange 2010, Service Pack 2
  /**
   * Exchange2010_SP2.
   */
  Exchange2010_SP2,
}

我应该如何规避这个问题?我应该放弃使用 ews-java-api 的选项并寻找另一种选择吗?如果有,请问您有什么建议?

【问题讨论】:

    标签: java exchange-server ewsjavaapi exchange-server-2013


    【解决方案1】:

    这里有答案:Can we connect to Exchange 2016 using EWS Managed API?

    据此,它应该与设置为 Exchange2010_SP2 的值正常连接。

    【讨论】:

    • 感谢您的及时回复!!
    【解决方案2】:

    这在 Exchange 2016 上也适用于我。请参阅下面的代码 (firstname.lastname@domain.com) 是我的电子邮件地址

    ExchangeCredentials credentials = new WebCredentials("firstname.lastname@domain.com", ews_password);
      global_exchange_service = new ExchangeService(ExchangeVersion.Exchange2010_SP2);
      global_exchange_service.setCredentials(credentials);
      global_exchange_service.setUrl(new URI(server_url));
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-12-06
      • 1970-01-01
      • 1970-01-01
      • 2013-01-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多