Checking if a MailItem is a reply

前端 未结 1 836
太阳男子
太阳男子 2020-12-21 23:28

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

Alice sends an email to Bob. Bob replies to Alice. When Bob replies, I want to BCC th

相关标签:
1条回答
  • 2020-12-21 23:51

    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.com/en-us/library/office/cc765583.aspx?f=255&MSPPError=-2147217396 for more details.

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

    0 讨论(0)
提交回复
热议问题