如何判断给定的 MAPI 消息是传入还是传出?

发布于 2024-08-07 22:35:35 字数 663 浏览 2 评论 0原文

在 Outlook 的 COM 插件(使用赎回)中,我需要能够确定我正在查看的给定消息是否已收到或发送(我只想对传入的消息进行操作)。在我的情况下,仅查看父文件夹或收件人或发件人是行不通的,因为传入和传出的邮件可能会被放在同一个(公共)文件夹中,并且可能有多个有效的发件人。此外,还可能存在从一个有效发件人发送到另一有效发件人的内部消息。

检查 PR_RECEIVED_BY_*PR_RCVD_REPRESENTING_* 来识别传入邮件对我来说也不是完整的解决方案,因为这些属性仅在邮箱存储和我正在处理的邮件中设置最常见的是在公用文件夹存储中(更准确地说:在启用邮件的公用文件夹中,代表该文件夹发送的邮件也放置在其中)。

我已经使用 OutlookSpy 来比较各种示例消息的 MAPI 属性,并多次认为我已经找到了一些东西,但到目前为止,我发现没有任何东西被证明是最终稳定的解决方案(例如,起初 PR_MESSAGE_RECIP_ME 似乎只能是设置传入消息而不是传出消息,但后来我发现传入消息也缺少该属性)。

本质上,我正在寻找一些始终仅在传入或传出消息上设置的属性(或其值)。

这至少需要与 Exchange 2003 和 2007 以及 Outlook 2003 和 2007 配合使用。

有什么想法吗?

In a COM-addin for Outlook (using Redemption) I need to be able to determine whether a given message that I'm looking at was received or sent (I only want to act on the incoming ones). Simply looking at the parent folder or the recipients or senders will not work in my case as both incoming and outgoing messages might be thrown together inside the same (public) folder and there can be multiple valid senders. Furthermore there might also be internal messages sent from one valid sender to another.

Checking for PR_RECEIVED_BY_* or PR_RCVD_REPRESENTING_* to identify the incoming mails is also no complete solution for me because these properties are only set in mailbox stores and the messages I'm dealing with will most commonly be in the Public Folder Store (more precisely: in mail-enabled Public Folders, where messages sent on behalf of that folder are placed as well).

I already used OutlookSpy to compare MAPI properties of various sample messages and thought several times I had found something but so far nothing I found proved to be an ultimately stable solution (e.g. at first PR_MESSAGE_RECIP_ME appeared to only ever be set on incoming messages and never on outgoing ones, but then I found incoming messages where that property was also missing).

Essentially, I'm looking for some property (or value thereof) that is always set on either incoming or outgoing messages only.

This needs to work at least with Exchange 2003 and 2007 and Outlook 2003 and 2007.

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

烙印 2024-08-14 22:35:35

电子邮件本身没有传入或传出的概念。我们需要对其应用一个参考框架。传入邮件是指进入您的组织还是进入邮箱?大多数计算电子邮件“方向”的系统都有 3 个类别:入站、出站和内部。

如果您无法使用邮件收件人来确定邮件的流向,那么您可能需要更好地解释情况,因为这将是最好的方法。

An email itself has no concept of incoming or outgoing. We need to apply a frame of reference to it. Does incoming messages mean into your organization or into a mailbox? Most systems that calculate the "direction" of an email have 3 categories: inbound, outbound, and internal.

If you can't use the messages recipient's to determine the flow of the message, then you might need to better explain the situation because that would be the best method.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文