检查 MailItem 是否是回复

编程入门 行业动态 更新时间:2024-10-08 08:22:20
本文介绍了检查 MailItem 是否是回复的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

给定一个 MailItem,我如何判断它是否是对另一封电子邮件的回复?

Given a MailItem, how do I tell if it's a reply to another email?

Alice 向 Bob 发送了一封电子邮件.鲍勃回复爱丽丝.当 Bob 回复时,我想将回复 BCC 发送给 Charlie.我在 Bob 的机器上使用 Application_ItemSend 每次他向 Alice 发送电子邮件时都这样做,但我只想在 Bob 回复给 Alice 时 BCC 给 Charlie(不是开始一个新的链).如果可能,我该怎么做?

Alice sends an email to Bob. Bob replies to Alice. When Bob replies, I want to BCC the reply to Charlie. I'm using Application_ItemSend on Bob's machine to do this every time he sends an email to Alice, but I only want to BCC to Charlie when Bob is replying to Alice (not starting a new chain). How can I do that, if possible?

推荐答案

您可以检查 MailItem.ConversationIndex 属性的长度 - 如果它是 44(十六进制字符串,PR_CONVERSATION_INDEX 属性),它是一个新消息,如果它长于这个,它是一个回复/转发.请参阅 https://msdn.microsoft/en-us/library/office/cc765583.aspx?f=255&MSPPError=-2147217396 了解更多详情.

You can check the length of the MailItem.ConversationIndex property - if it is 44 (hex string, 22 bytes for the PR_CONVERSATION_INDEX property), it is a new message, if it is longer than that, it is a reply/forward. See https://msdn.microsoft/en-us/library/office/cc765583.aspx?f=255&MSPPError=-2147217396 for more details.

您还可以检查 RE FW 等的主题前缀,但主题可以修改,并且值是特定于区域设置的.

You can also check the subject prefix for RE FW, etc., but the subject can be modified, plus the values are locale specific.

这篇关于检查 MailItem 是否是回复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-03-29 12:44:12,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/756990.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:MailItem

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!