如何获得来自不同用户的一个电子邮件链的通用Outlook Mailitem ConversationID [英] How to get universal outlook mailitem ConversationID for one email chain replied from different users

查看:217
本文介绍了如何获得来自不同用户的一个电子邮件链的通用Outlook Mailitem ConversationID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用C#开发OUTLOOK 2010插件.此插件将基于对话创建活动. 例如,一个用户创建新电子邮件,其他用户答复,转发或抄送,将此电子邮件链视为一个会话线程.多个电子邮件具有相同的mailItem.ConversationID. 基于此对话ID,我的程序生成了一个活动,并将对话id链接到可以在此电子邮件链中的每封电子邮件中看到的活动. 在我的机器上一切正常(我在同一电子邮件链中回复,转发,抄送,获得相同的sessionID).但是,当其他用户回复电子邮件触发我的程序生成活动时,它生成了不同的ConverstationID(同一电子邮件链).

I am developing an OUTLOOK 2010 addin in C#. This addin will create activities based on conversation. For example, one user create new email, others reply,forward or CC, treat this email chain as one converstaion thread. Thoes emails have the same mailItem.ConversationID. Based on this conversationID, my program generated an activty, and link conversationid to the activity which can be seen in each email in this email chain. It all works fine on my machine (I reply,forward,cc in the same email chain, it get the same conversationID). However when other user reply email trigger my program generate activities, it generated different ConverstationID (the same email chain).

我的问题是: 1.ConversationID仅在本地有效吗?就像在不同用户计算机中的同一电子邮件链一样,sessionID是否不同? 2.只要用户使用的是相同版本的OUTLOOK,一个电子邮件链上是否存在通用的mailitem会话ID?

My question is: 1.ConversationID works only in local? Like for the same email Chain in different user's machine, the conversationID is different? 2.Is there universal mailitem conversationID for one email chain as long as user is using the same version of OUTLOOK?

var mailItem = this.OutlookItem as OutlookNS.MailItem;


        if (mailItem.ConversationID != null )
        {
            OutlookHelper.Conversation_Index = mailItem.ConversationIndex;
            OutlookHelper.Conversation_Topic = mailItem.ConversationTopic;
            OutlookHelper.Current_ConversationID = mailItem.ConversationID;
            CreateActivity(mailItem.ConversationTopic,mailItem.ConversationID);
        }

我已经尝试过EntryID,此属性一直在变化.

I already tried EntryID, this attribute is keep changing.

推荐答案

我自己弄清楚了. 同一电子邮件链中的所有电子邮件都具有相同的ConversationIndex前44个字符.每当新的回复者回复此电子邮件时,ConversationIndex都会附加一个新的拉姆顿生成的44个字符的字符串.它是使用差异计算机的用户的通用标识.但是,当此电子邮件的主题更改时,将生成一个全新的44个字符的ConversationIndex. ConversationID仅在本地有效,以跟踪同一电子邮件链中的电子邮件

I figured it out myself. All the email in the same email chain has the same first 44 character of ConversationIndex. Everytime when a new replyer reply this email, the ConversationIndex will append a new ramdon generated 44 characters string. It is a universal identity applied for user using differet machine. But when the subject of this email is changed, a brand new 44 charaters ConversationIndex will be generated. ConversationID only works in local to track emails in the same email chain

这篇关于如何获得来自不同用户的一个电子邮件链的通用Outlook Mailitem ConversationID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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