我们如何强制将邮箱项目保留到EWS? [英] How can we force a mailbox item to be persisted to EWS?

查看:86
本文介绍了我们如何强制将邮箱项目保留到EWS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

注意:此特定问题对我们的客户有重大影响,转化为对业务的高影响,直接影响了收入.

Note: This particular issue has significant impact on our customers, which translates to high business impact with direct consequences on revenue.

TL; DR.

当用户在编写电子邮件草稿时与我们的外接程序进行交互时,Outlook的Office外接程序如何将在 EWS GetItem API 返回从Office.context.mailbox.item.saveAsync()收到的itemId的响应是否正确?

TL;DR.

How can our Office add-in for Outlook, when a user interacts with our add-in while composing an email draft, minimize the amount of time it takes before the EWS GetItem API will return an OK response for the itemId we receive from Office.context.mailbox.item.saveAsync()?

如果事实证明我们的加载项无法控制将项目保留到EWS的时间,那么最终用户可以采取什么措施来加快操作速度 >?

If it turns out that our add-in has no control over when the item will be persisted to EWS, then what could an end-user do to speed this up?

我们正在寻找(a)技术解决方案或(b)消息传递,以指导我们的客户如何缓解/修复/解决此问题.

We are looking for either (a) a technical solution, or (b) messaging to instruct our customers on how to mitigate/fix/work around this issue.

我们的某些客户无法使用我们的Office Outlook加载项发送电子邮件,或者必须等待很长的时间(> 2分钟)才能发送电子邮件.

Some of our customers are unable to send emails using our Office add-in for Outlook, or have to wait an exceedingly long time (> 2 minutes) before their email will send.

我们希望所有客户都能够使用我们的外接程序发送电子邮件,而不必等待不合理的时间.

We want all of our customers to be able to send emails using our add-in, without having to wait for an unreasonable amount of time.

根据我们的日志和客户报告,此问题仅存在于 Outlook 2016 for Windows 桌面应用程序中.我们没有证据表明此问题存在于其他任何版本的Outlook中,包括Outlook 2013或Outlook for Mac,但是这些客户端中也可能存在此问题.

Based on our logs and customer reports, this issue only exists in the Outlook 2016 for Windows desktop application. We have no evidence to suggest the issue is present in any other version of Outlook, including Outlook 2013 or Outlook for Mac, however it is possible that the issue may be present in those clients as well.

我们的加载项与撰写模式集成在一起,可在编写电子邮件时提供其他功能,例如模板,后续信息,打开和单击跟踪以及计划.

Our add-in integrates with Compose mode to provide additional functionality while composing email messages, such as templates, follow-ups, open and click tracking, and scheduling.

我们的插件与我们的SaaS产品协同工作,如下所示:

Our add-in works in tandem with our SaaS product like this:

  1. 我们的外接程序使用元数据设置电子邮件上的EWS扩展属性,以指示该消息上启用了哪些功能.

  1. Our add-in sets EWS extended properties on the email message with metadata indicating which features are enabled on that message.

我们的带外SaaS产品配置为通过EWS API从客户的邮箱中读取.当遇到我们的Office加载项编写的EWS扩展属性时,它将触发代码路径来满足所需的行为.

Our SaaS product, out of band, is configured to read from the customer's mailbox via the EWS API. When it encounters EWS extended properties our Office add-in has written, it triggers the code paths to satisfy the desired behavior.

根本原因分析

此问题的根本原因是我们与Windows版Outlook 2016中的EWS交互. 为了与EWS成功交互以读取/写入邮箱项目,它必须知道该项目.

Office.context.mailbox.item.saveAsync() 说:

在Outlook Web App或Outlook的联机模式下,该项目将保存到服务器.在Outlook处于缓存模式下,该项目将保存到本地缓存中.

In Outlook Web App or Outlook in online mode, the item is saved to the server. In Outlook in cached mode, the item is saved to the local cache.

进一步说:

注意:如果您的加载项在撰写模式下对项目调用saveAsync以获得itemId与EWS或REST API一起使用,请注意,当Outlook是在缓存模式下,可能需要一些时间才能将项目实际同步到服务器.在同步项目之前,使用itemId将返回错误.

Note: If your add-in calls saveAsync on an item in compose mode in order to get an itemId to use with EWS or the REST API, be aware that when Outlook is in cached mode, it may take some time before the item is actually synced to the server. Until the item is synced, using the itemId will return an error.

因此,我们得出的结论是,尽管Office.context.mailbox.item.saveAsync()确实确实返回了最终有效的 itemId,但并不能保证任何后续的EWS交互都会成功.到目前为止,我们还没有找到方法来加速Outlook客户端使EWS意识到邮箱项目的过程.

Thus, we have concluded that Office.context.mailbox.item.saveAsync(), although it does indeed return an eventually valid itemId, does not guarantee that any subsequent EWS interaction will succeed. So far, we have found no way to accelerate the process of the Outlook client actually making EWS aware of the mailbox item.

我们尝试通过轮询

We have attempted to mitigate this problem by polling EWS GetItem to attempt to obtain a ChangeKey for the item with the itemId we receive from Office.context.mailbox.item.saveAsync(). While we have seen that this does eventually succeed, it may take a minute or longer before this occurs. That is simply far too much time for our customers to have to wait.

如果Outlook 2016 for Windows桌面客户端处于缓存模式",则用户可以执行以下任何操作:

If the Outlook 2016 for Windows desktop client is in "cached mode", is there anything the user can do to:

  1. …知道客户端处于缓存模式"还是在线模式"?
  2. …试图强迫客户进入在线模式"?

推荐答案

无法在缓存模式下加快速度.不幸的是,这是在撰写模式下saveAsync的局限性.注意事项:

There is no way to speed this up in cached mode. Unfortunately this is a limitation of saveAsync in compose mode. Some things of note:

1)EWSId仅在项目为草稿时有效.发送后,当该项目在已发送项目中时,它将具有一个新的EWSId,该EWSId无法从Office.js

1) The EWSId is only valid while the item is a draft. After it is sent, when the item is in sent items, it will have a new EWSId which is not obtainable from the Office.js

2)您可以将信息保存到自定义属性中,而不是保存到EWS扩展属性中吗? (Office.context.mailbox.item.customProperties) https ://dev.office.com/reference/add-ins/outlook/1.5/CustomProperties?product = outlook

2) Could you save your information into the custom properties, instead of the EWS Extended Properties. (Office.context.mailbox.item.customProperties) https://dev.office.com/reference/add-ins/outlook/1.5/CustomProperties?product=outlook

这些属性将保存到已发送邮件中的邮件中,但不会传输.那你能找到那些属性

These properties will be saved to the mail in the sent item, but will NOT be transmitted. Then could you find those properties

这些作为JSON字典存储在键/值对中的项目上. mapi属性的名称为"cecp- [来自清单的扩展名ID]"(在PS_PUBLIC_STRINGS中)

These are stored as a JSON dictionary on the item in Key/Value pairs. The name of the mapi property is "cecp-[extension id from manifest]" (in PS_PUBLIC_STRINGS)

https://msdn.microsoft.com/en-us /library/office/cc842512.aspx

3)听起来像是一种更好的方法来解决此问题,这将是通过Office.js函数提供对此功能的写权限吗? (尽管我们并不完全了解您的情况).请求新功能应通过UserVoice:

3) It does kind of sound like a better way to solve this would be an Office.js function that gives write access to this? (though we don't completely understand your scenario). Request for new features should go through UserVoice:

https://officespdev.uservoice.com /forums/224641-general/category/131778-outlook-add-ins .

4)处于在线模式将大大减少时间.用户可以知道他或她是否处于在线模式,而外接程序则不能.

4) Being in Online Mode would greatly mitigate the time. A User can know whether or not he or she is in online mode, but an Add-in cannot.

https://support.office.com/zh-CN/article/Turn-on-Cached-Exchange-Mode-7885af08-9a60-4ec3-850a-e221c1ed0c1c

此外,状态栏将在缓存模式下显示已连接到Microsoft Exchange",在联机模式下显示使用Microsoft Exchange联机".

Additionally, the status bar will say "Connected to Microsoft Exchange" in cached mode, and "Online with Microsoft Exchange" in online mode.

切换到联机模式将消除缓存模式带来的许多好处.缓存模式是Outlook 2016中的默认模式.

Switching to Online mode, removes a lot of the benefits that cached mode has. Cached mode is default in Outlook 2016.

这篇关于我们如何强制将邮箱项目保留到EWS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆