扩展MAPI:如何获取CopyMessages移动的消息的条目ID

发布于 2024-08-31 15:12:24 字数 288 浏览 2 评论 0原文

我发现如果我使用 IMAPIFolder::CopyMessages 移动邮件(使用 MESSAGE_MOVE 标志)消息获得新的条目 ID。然而,我没有看到任何可靠的方法来获取消息在新位置的条目 ID,或者以其他方式获取对其的引用。

到目前为止,我得到的最好的建议是在移动之前用旧的自定义属性标记消息,然后进行搜索,但我想知道是否有一个不太复杂的解决方案。

I have found that if I move a message using IMAPIFolder::CopyMessages (using the MESSAGE_MOVE flag) the message gets a new entry ID. However I do not see any reliable way of getting the entry ID of the message in its new location, or otherwise getting a reference to it.

The best suggestion I have had so far involves tagging the message with the old custom property before moving, and then doing a search afterwards, but I was wondering if there is a less convoluted solution.

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

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

发布评论

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

评论(1

碍人泪离人颜 2024-09-07 15:12:25

PR_SEARCH_KEY 属性在移动后应保持不变。移动后您仍然需要搜索消息,但它确实消除了仅用于标记消息的自定义属性。

另一种可能性是在目标文件夹上使用 IMAPIAdviseSink 设置通知你移动消息。我个人还没有这样做过,而且这可能比其价值更多的工作。

The PR_SEARCH_KEY property should remain the same after the move. You would still have to search for the message after the move but it does eliminate the custom property just for tagging the messages.

Another possibility would be to setup notifications using IMAPIAdviseSink on the destination folder before you move the messages. I haven't done this personally, and it might be more work than it's worth.

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