locked
Email IDs RRS feed

  • Question

  • Hi,

    I was qondering if there is an identifier attached to emails? (for example, if i forward a message to 3 people each of those emails would have the same ID). I'm making an email archiving program and want to try to avoid multiple copies of the same email from being inserted. I heard some mention of an identifier, but it was all in relation to outlook 2007/exchange 2007. We're running outlook 2003 and exchange 2003
    Thanks
    Monday, May 31, 2010 1:25 PM

Answers

  • Sorry, I was thinking that you'd be inserting the e-mail as an attachment.  In your case, the only thing those e-mails will have in common is the sender and Subject.  I'd recommend storing the PR_SEARCH_KEY of the source e-mail that's forwared in a custom property on the delivered e-mail.
    (P.S. Please don't forget to mark this post as an answer if it has helped you)
    Eric Legault: MVP (Outlook), MCTS (SharePoint)
    Owner: Collaborative Innovations
    Twitter: elegault
    Blog: Eric Legault My Eggo
    • Proposed as answer by Ji.Zhou Tuesday, June 1, 2010 7:03 AM
    • Marked as answer by Ji.Zhou Monday, June 7, 2010 3:16 AM
    Monday, May 31, 2010 6:33 PM

All replies

  • There are several unique (some more than others) identifiers for e-mails:

    • MailItem.EntryID
    • MailItem.StoreID (identifies the Outlook store (.ost or .pst file) where the message is stored)
    • PR_SEARCH_KEY

    In some circumstances you can also maybe get away with using MailItem.ConversationID and MailItem.ConversationTopic.


    (P.S. Please don't forget to mark this post as an answer if it has helped you)
    Eric Legault: MVP (Outlook), MCTS (SharePoint)
    Owner: Collaborative Innovations
    Twitter: elegault
    Blog: Eric Legault My Eggo
    Monday, May 31, 2010 2:57 PM
  • I was using MailItem.EntryID before, but I thought that in the circumstance i described above (i.e. forwarding an email to 3 different people) each of those forwarded messages would have a different entryID, so they'd be indentified as differente and all three would be eligible to be put into the archive if selected. Is that not the case? If so do you know if the other two examples you listed will work? thanks
    Monday, May 31, 2010 4:53 PM
  • Sorry, I was thinking that you'd be inserting the e-mail as an attachment.  In your case, the only thing those e-mails will have in common is the sender and Subject.  I'd recommend storing the PR_SEARCH_KEY of the source e-mail that's forwared in a custom property on the delivered e-mail.
    (P.S. Please don't forget to mark this post as an answer if it has helped you)
    Eric Legault: MVP (Outlook), MCTS (SharePoint)
    Owner: Collaborative Innovations
    Twitter: elegault
    Blog: Eric Legault My Eggo
    • Proposed as answer by Ji.Zhou Tuesday, June 1, 2010 7:03 AM
    • Marked as answer by Ji.Zhou Monday, June 7, 2010 3:16 AM
    Monday, May 31, 2010 6:33 PM