以编程方式访问Exchange文件夹中的存档邮件 [英] Programmatically accessing archived mails in an Exchange folder

查看:98
本文介绍了以编程方式访问Exchange文件夹中的存档邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过ActiveX界面访问给定文件夹中的所有邮件到Outlook2013.我使用Outlook的消息API(MAPI)获取所需的文件夹对象.

但是,当我浏览此文件夹对象的所有项目时,缺少许多消息.的确,MS Exchange服务器上的某些邮件由于太旧而无法与Outlook同步.(在Outlook中,该文件夹以名为单击此处以在Microsoft Exchange上查看更多信息"的链接结尾.单击该链接时,丢失的消息出现在Outlook中.但是,在执行此操作后,它们不会添加到文件夹对象中.)/p>

如何访问这些消息?是否可以通过Outlook ActiveX界面?如果没有,MS Exchange服务器是否具有等效的接口?

解决方案

要访问较旧(但未存档)的电子邮件,您可以

  1. 设置Exchange帐户以同步"Exchange帐户属性"对话框中的所有项目.Outlook必须重新启动.
  2. 设置Exchange帐户以编程方式同步所有项目.您可以使用扩展MAPI(仅C ++或Delphi)来做到这一点,需要在MSEMS配置文件部分中设置一个标志.兑换(任何语言)都会公开赎回,您可以在使用 解决方案

To access older (but not archived) emails, you can either

  1. Set the Exchange account to sync all items in the Exchange account properties dialog. Outlook must be restarted.
  2. Set the Exchange account to sync all items programmatically. You can do that using Extended MAPI (C++ or Delphi only), there is a flag that needs to be set in the MSEMS profile section. Redemption (any language) exposes the RDOExchangeMailboxStore.MonthsToKeepOffline / DaysToKeepOffline properties. Outlook must be restarted.
  3. Open the parent folder in the online mode using the MAPI_NO_CACHE flag when calling IMsgStore::OpenEntry (Extended MAPI, C++ or Delphi only). Redemption lets you pass that flag when you open the folder using RDOSession.GetFolderFromID from any language.

这篇关于以编程方式访问Exchange文件夹中的存档邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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