Exchange 2013 到 Exchange 2016
Exchange 2013 to Exchange 2016
在 Exchange 2013 中,我使用 EmailMessage 对象生成了一封电子邮件。我将此消息保存在 Drafts 文件夹中,并从保存方法中获取一个 ID。然后,我通过绑定从草稿文件夹加载电子邮件消息,并从我撰写 URL 的消息加载到使用 "WebClientReadFormQueryString" 属性 创建的电子邮件。然后我可以将用户定向到加载了此电子邮件的 OWA 弹出窗口。
现在我们已迁移到 Exchange 2016,弹出窗口不会加载。生成的电子邮件可以在草稿文件夹中看到。我希望它自动显示加载了电子邮件草稿的 OWA 弹出窗口。 (与 Exchange 2013 的行为相同)。
提前致谢。
请参阅 WebClientReadFormQueryString
上 Microsoft 官方文档的 版本差异 部分
Versions of Exchange starting with major version 15 and ending with Exchange Server 2013 build 15.0.775.38 (CU3) and Exchange Online version 15.00.0775.009 do not return a correct query string fragment in the WebClientReadFormQueryString element.
In versions of Exchange earlier than major version 15, the item
identifier for the Outlook Web App URLs is an Outlook Web App
identifier. If you are targeting a version of Exchange earlier than
major version 15, you have to use the ConvertId operation to convert
the identifier.
您可能需要在代码中执行以下操作:
// Versions of Exchange starting with major version 15 and ending with Exchange Server 2013 build 15.0.775.09
// returned a different query string fragment. This optional check is not required for applications that
// target Exchange Online.
if ((serverInfo.MajorVersion == 15) && (serverInfo.MajorBuildNumber < 775) &&(serverInfo.MinorBuildNumber < 09))
{
// If your client is connected to an Exchange 2013 server that has not been updated to CU3,
// this query string will be returned.
owaReadFormQueryString = string.Format("#viewmodel=_y.$Ep&ItemID={0}",
System.Web.HttpUtility.UrlEncode(ewsIdentifer, Encoding.UTF8));
}
else
{
// If your client is connected to an Exchanger 2010, Exchange 2013 CU3, or Exchange Online server,
// the WebClientReadFormQueryString is used.
owaReadFormQueryString = msg.WebClientReadFormQueryString;
}
// Create the URL that Outlook Web App uses to open the email message.
Uri url = service.Url;
string owaReadAccessUrl = string.Format("{0}://{1}/owa/{2}",
url.Scheme, url.Host, owaReadFormQueryString);
if (!string.IsNullOrEmpty(owaReadAccessUrl))
{
System.Diagnostics.Process.Start("IEXPLORE.EXE", owaReadAccessUrl);
}
在 Exchange 2013 中,我使用 EmailMessage 对象生成了一封电子邮件。我将此消息保存在 Drafts 文件夹中,并从保存方法中获取一个 ID。然后,我通过绑定从草稿文件夹加载电子邮件消息,并从我撰写 URL 的消息加载到使用 "WebClientReadFormQueryString" 属性 创建的电子邮件。然后我可以将用户定向到加载了此电子邮件的 OWA 弹出窗口。
现在我们已迁移到 Exchange 2016,弹出窗口不会加载。生成的电子邮件可以在草稿文件夹中看到。我希望它自动显示加载了电子邮件草稿的 OWA 弹出窗口。 (与 Exchange 2013 的行为相同)。
提前致谢。
请参阅 WebClientReadFormQueryString
上 Microsoft 官方文档的 版本差异 部分Versions of Exchange starting with major version 15 and ending with Exchange Server 2013 build 15.0.775.38 (CU3) and Exchange Online version 15.00.0775.009 do not return a correct query string fragment in the WebClientReadFormQueryString element.
In versions of Exchange earlier than major version 15, the item identifier for the Outlook Web App URLs is an Outlook Web App identifier. If you are targeting a version of Exchange earlier than major version 15, you have to use the ConvertId operation to convert the identifier.
您可能需要在代码中执行以下操作:
// Versions of Exchange starting with major version 15 and ending with Exchange Server 2013 build 15.0.775.09
// returned a different query string fragment. This optional check is not required for applications that
// target Exchange Online.
if ((serverInfo.MajorVersion == 15) && (serverInfo.MajorBuildNumber < 775) &&(serverInfo.MinorBuildNumber < 09))
{
// If your client is connected to an Exchange 2013 server that has not been updated to CU3,
// this query string will be returned.
owaReadFormQueryString = string.Format("#viewmodel=_y.$Ep&ItemID={0}",
System.Web.HttpUtility.UrlEncode(ewsIdentifer, Encoding.UTF8));
}
else
{
// If your client is connected to an Exchanger 2010, Exchange 2013 CU3, or Exchange Online server,
// the WebClientReadFormQueryString is used.
owaReadFormQueryString = msg.WebClientReadFormQueryString;
}
// Create the URL that Outlook Web App uses to open the email message.
Uri url = service.Url;
string owaReadAccessUrl = string.Format("{0}://{1}/owa/{2}",
url.Scheme, url.Host, owaReadFormQueryString);
if (!string.IsNullOrEmpty(owaReadAccessUrl))
{
System.Diagnostics.Process.Start("IEXPLORE.EXE", owaReadAccessUrl);
}