3
votes

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).

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);
        }

I already tried EntryID, this attribute is keep changing.

1

1 Answers

1
votes

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