cancel
Showing results for 
Search instead for 
Did you mean: 

EV Outlook Add-In - Detecting emails archived by EV

Carlos_Castro
Level 4

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

29 REPLIES 29

Carlos_Castro
Level 4

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!

Rob_Wilcox1
Level 6
Partner

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:

 

 


                        // Determine if the item is an Enterprise Vault item
                        if (msgClass.Contains("IPM.Note.EnterpriseVault.Shortcut"))
                            MessageBox.Show("Found an Enterprise Vault item.");
                        else
                            MessageBox.Show("This is not an Enterprise Vault item.");

 

 

Working for cloudficient.com

Carlos_Castro
Level 4

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.

Carlos_Castro
Level 4

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?

TonySterling
Moderator
Moderator
Partner    VIP    Accredited Certified

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.

Rob_Wilcox1
Level 6
Partner
There are a few different ways... firstly though if they have an icon LIKE the Enterprise Vault, then they are probably Enterprise Vault archived items.. maybe dragged and dropped from another mailbox, a PST, or something. The best way is to use Outlook Spy and look at the MAPI properties of each message. If it's an archived item, you'll see properties like Archive ID, and so on. Or, you can as I suggested, and expand Ben's code to ... a/ Show the subject of the items. b/ Show the folder name. etc.
Working for cloudficient.com

Carlos_Castro
Level 4

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?

Rob_Wilcox1
Level 6
Partner
Sorry to jump, was just scrolling through on my iPad. ... You change the safety setting, by going to the Vault Admin console, navigate to your Vault Store, and it's on the properties tab for that. (I think... I mean that's the problem with the iPad.. handy, but horrible for RDP)
Working for cloudficient.com

AndrewB
Moderator
Moderator
Partner    VIP    Accredited

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.

Carlos_Castro
Level 4

Well that worked perfectly. Thanks for your help guys!