08-13-2012 11:57 AM
Hi everyone,
I would like to write an Outlook add-in in C# that is able to detect if a given email is stored in exchange or in enterprise vault. Is there some way I can detect the difference from my add-in code?
This should be possible since outlook and EV plugin know where each email is, so they must be tagged in some way.
Thanks for your help!!! Please let me know if further information or clarifications are needed.
Carlos
Solved! Go to Solution.
08-14-2012 07:57 AM
If when I execute Ben's code, I get as class the value "IPM.Note", what does it mean? That it is some kind of enterprise vault thing, but not a shortcut?
In the test account I've got only one email with the EV icon and no more emails aat all, but when I execute Ben's code there are lots of mailIItems of IPM.Note class, what are they?
Thanks guys!
08-14-2012 08:34 AM
IPM.Note is the message class for a regular email.
The code appears to be hooking on to your current Outlook session - so if you are looking at testing against a 'test' account, then Outlook will need to be open with that account, I think.
i.e.
Outlook.Folder rootFolder = this.Application.Session.DefaultStore.GetRootFolder() as Outlook.Folder;
I'd also suggest modifying this part of the code to output things like SUBJECT of the message, so you can see what it is:
08-14-2012 08:40 AM
Rob, thanks for your answer. The test account is configured in outlook, it's the only one account in the computer, and has only one received email with the Ev logo in the inbox, and one sent item, but the weird thing was that in the code there appeared more thant ten mail items.
How can I be for sure that a mail comes from EV, from an outlook 2007 user perspective? some emails have a different icon next to them, pretty much like EV one.
08-14-2012 09:12 AM
I've run archiving and changed the date to force archiving of some mails, and I got emails of class IPM.Note.EnterpriseVault.PendingArchive - that means that in the near future it will automatically turn into Shortcut soon?
08-14-2012 09:17 AM
Yes, most likely your safety copy strategy is after backup. That means when your backup runs the message class will change to that of the shortcut.
08-14-2012 09:33 AM
08-14-2012 09:35 AM
Hi Tony, thanks for your answer. Could you give me a hint on how could I remove the after backup strategy configuration so it instantly becomes a shortcut?
08-14-2012 09:40 AM
08-14-2012 09:57 AM
open the vault console, go to vault store groups, expand your vault store group, right-click properties on the vault store, on the general tab there's 'settings' 'remove safety copy:', in the dropdown menu choose 'immediately after archive'. then restart the storage service.
08-14-2012 12:17 PM
Well that worked perfectly. Thanks for your help guys!