Home
TeamSite
Unique Mail MsgId
bfelknor
Is it possible to write a wrapper around the command that sets the Unique Message ID ?
I'd like to write my own logic for maintaining the data in that field, but I want WorkSite to add my value when importing a message, not the Internet Message Id.
Any ideas ?
Thanks.
Bruce
Find more posts tagged with
Comments
bfelknor
Maybe I need to look at:
IManExt2Lib.IManEmailDuplicateDetectCmd ?
Is there an example showing the use of this command ? Can a wrapper be written to effectively hijack the command under all circumstances for the client applications ?
jny
Could you send in a screen capture of the command you're referring to? Thanks.
bfelknor
You mean the user interface when this command is invoked ? The only thing I've ever seen in that regard is a prompt when a duplicate email is being imported. This only occurs when the option: Enable Duplicate Email Notification is checked.
Or are you referring to something else ?
jny
Yes, basically, I need to see something that will give me some idea as to which command you would like to wrap around.
bfelknor
Ok, attached is a screen shot showing an error message generated when dragging a duplicate email message into a WorkSite folder. I don't know if this is much help to you.
This notification message can be turned on/off by setting the Advanced Options "Enable Duplicate Email Notification" flag.
Bruce
jny
This is just a duplicate message box to let you know that the message already exists.
If you'd like to put in your own unique message id in the profile field, you may do so by calling NRTDocument.SetAttributeValueyByID nrMessageUniqueID, "<value>" through nrs scripting. You may call this method off of the document object at PostOnOK where you can get a handle to the document object after it's been imported to WorkSite via Context("ImportedDocument'). Like so:
[newprof.nrs]
Const nrMessageUniqueID=100
Sub NewProfileCmd_PostOnOK(dlg)
dim oImportedDoc, sMessageID, vErrs
sMessageID="<someUniqueID>"
set oImportedDoc = Context("ImportedDocument")
oImportedDoc.SetAttributeValueByID nrMessageUniqueID, sMessageID
oImportedDoc.Update vErrs
End Sub
Please note that if you have Email Management System in place, this script will render useless as this MessageUniqueID field is exclusively used by the EMS; so, the value you put into this field will get overwritten by our server.
bfelknor
Ok, I see, and thanks.
But I think there is another twist: There must be an algorithm used to determine the Unique MSG_ID in order for duplicate notification to work (with or without EMS.) I mean, without EMS duplicate notification still works for messages with PR_INTERNET_MESSAGE_ID set (or any message that passed through an SMTP server.) I'm assuming the algorithm to which I refer merely looks for Internet Message ID and uses it, if it finds it. Is that correct ?
OR, does it first look for MSG_ID already being populated before the duplicate detection takes place ? If that were the case, then populating the MSG_ID field from a script on the New Profile form would work, right ?
Do you see what I'm driving at ?
Bruce
birt_image.jpg
jny
Not exactly. Are you attempting to do away with the default dup detection? Exactly what are you trying to do when importing an e-mail message to WorkSite? Give me the high-level details of your objective.
bfelknor
I'd like to have the Dup Detection work, but there is not EMM installed. So, what I'd like to do is provide a value for each email that WorkSite *will use* for dup detection. It appears to me that PR_INTERNET_MESSAGE_ID (or a variation of it) is used for incoming messages. For other messages, say drafts or intra-exchange server messages, or any message w/o an INTERNET_MESSAGE_ID, dup detection doesn't work. I'd like to make it work.
Bruce
(Enthusiastic)
jny
I see. Well, there isn't a way using the WorkSite SDK to put in a value on the import document object for FileSite to use to dup-detect. FileSite will only be able to dup-detect msg files that contain the internet message ID's -- and these are read-only values thus they cannot be put into the msg file programmatically.
What you could probably do is implement a client-side logic to: (1) generate a unique id using Guid Generator, and (2) put this unique id value in the user property of the to-be-imported msg file's user property via Outlook Object Model.