If you pass the IMail object to the below function you will get the history of the Message ID's
Private Function GetMessageOriginalIDs(e As IMAIL) As String()
'-- References header is where the MessageID history is kept
For Each S As String In e.Headers.AllKeys
If S.ToLower.Contains("references") Then
Return e.Headers.Item(S).ToString().split"("< >")
Exit For
End If
Next
Return new string(){}
End Function
Sample usage:
Dim OriginatingMessageId As String
If GetMessageOriginalIDs(e).Count > 0 Then
'-- Message ID should be in order of index
OriginatingMessageId = GetMessageOriginalIDs(e)(1)
End If
This should then give you the Id of the originating message that you can then retreive from the mailbox/database.
Hope this helps.
Gary