Uniquely Identifies MailItem

Add-in Express™ Support Service
That's what is more important than anything else

Uniquely Identifies MailItem
 
Rup Go




Posts: 64
Joined: 2007-03-01
Hi,

i got this problem and i don't think if this can be done, i want to uniquely identify a mailitem, is there a way to know? like this mail is sent on tuesday 9:30am date, and in the inspector bar i have a button SAVE/ADD to database. Now when the user click the mailitem again and popups the inspector window it will know that this email has been added.

thanks in advance
Posted 11 Apr, 2007 21:44:12 Top
Pierre-D. Savard




Posts: 41
Joined: 2007-03-23
You can use user property of the mail item to save a GUID in it:

GUID = System.Guid.NewGuid.ToString("B").ToUpper
prop = newMail.UserProperties.Add("crmid", Outlook.OlUserPropertyType.olText)
prop.Value = GUID
newMail.Save()
Posted 12 Apr, 2007 08:32:07 Top
David Ing




Posts: 39
Joined: 2007-02-16
EntryId?

http://msdn2.microsoft.com/en-us/library/bb207146.aspx

If you need it to be unique then store the StoreId with it too:

http://msdn2.microsoft.com/en-us/library/bb176542.aspx
Posted 12 Apr, 2007 09:07:15 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Rup.

I agree with David.



P.S. Note that we take up your forum requests in the order we receive them.
Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found.

Posted 12 Apr, 2007 09:47:57 Top
Rup Go




Posts: 64
Joined: 2007-03-01
hi guys, thanks for the help.

but here is the problem what i really need is to track all messages that originated in 1 mail item meaning i received mail01 then i replied or forward ed it to a friend the one i will send should have a unique key so that when they replied back to me the unique key should stay in the mail.

all i can think of is to insert/inject a TEXT marking "KEY: 001" so when the email trail becomes longer - infinity the KEY: 001 text will still exist on the mail, in that case i can just string match it and easily identifies on which mail it originated.

the disadvantage of this is that when the user deleted the KEY: 001 which is my tracking string in the mail, then their will be no more connection string pointing to the originating mail.

ME sends Email to friend1
friend1 replies back
ME replied aswell
friend1 replied

they should be link to each other using the inserted text.

so can i insert text permanently in the mail item? so that it wont be erase.

thanks!
Posted 12 Apr, 2007 23:20:54 Top
David Ing




Posts: 39
Joined: 2007-02-16
Might not be exactly what you want but you should take a look at the Conversation Id / Topic, i.e:
http://msdn2.microsoft.com/en-us/library/bb207140.aspx

Otherwise it might be better to put something in the email's header via MAPI...

PS I'm here for my own post, so I though I might as well be useful and reply to a few :-)
Posted 13 Apr, 2007 09:45:19 Top
Alex Abramov




Posts: 34
Joined: 2006-09-15
You can use the MessageID:

PR_INTERNET_MESSAGE_ID
urn:schemas:mailheader:message-id
http://schemas.microsoft.com/mapi/proptag/0x1035001E

This breaks down if there are more than one email account setup for that outlook. Outlook will create different message id's then and another id would have to be used
Posted 13 Apr, 2007 13:26:43 Top
Rup Go




Posts: 64
Joined: 2007-03-01
Thanks David il look into this

hi alex your link doesn't work ^_^ thanks! can you repost it?
Posted 15 Apr, 2007 23:06:28 Top
Rup Go




Posts: 64
Joined: 2007-03-01
hi David,
i tried the one on the link but it didnt work :) doesn't identify email trails as 1.

put something in the email's header? u mean the subject? it is still editable though
Posted 15 Apr, 2007 23:48:55 Top
Rup Go




Posts: 64
Joined: 2007-03-01
hi David,

i got the header idea, how can i change or retreive the header though? is the a mailObject.header? thanks a lot for replying
Posted 16 Apr, 2007 02:09:21 Top