cancel
Showing results for 
Search instead for 
Did you mean: 

Restore archived mail / api

MaxMelcher
Level 3

Hi there,

I have a similar problem as mentioned in this thread: https://www-secure.symantec.com/connect/forums/fetch-mail-andor-mail-entryid-ev-sdk

I want to unarchive an email from outside the enterprise vault http-only addin - in my custom outlook addin. I know there is no support for what I am doing, but for the convenience of the users I would risk it.

As far as I understand it should be two steps to replace the archived mail with the original:

  1. Set the mail MessageClass to “IPM.Note.EnterpriseVault.Shortcut.RestoreMe”;
  2. Do a http call to the enterprise vault webservice (got it from fiddler).

I can easily do step 1  - in step 2. I get an http 200 so I assume I did everything correctly.

But now the mail is not replaced - is there something I am missing?

Thanks a lot!

Max

 

1 ACCEPTED SOLUTION

Accepted Solutions

Rob_Wilcox1
Level 6
Partner

You also need to set the action time stamp property, which is a property that the server side looks for in order to perform the restore request.  The restore request sent via HTTP also passes that property. Then the server side will need to be traced (as mentioned earlier) to see if it is then actioning things correctly. [It takes in the parameters off the HTTP request and will look for messages in a particular mailbox/archive and for that all import time stamp]

Working for cloudficient.com

View solution in original post

9 REPLIES 9

GabeV
Level 6
Employee Accredited

Hi Max,

The HTTP 200 is just IIS telling you that the request was received and had no errors. You can collect a dtrace while you are running your code to see what is ocurring in the Enterprise Vault server after the request is received

MaxMelcher
Level 3

Hi GabeV,

 

thanks - what is a dtrace? Can I do this externally or do I have to go to the guys running the EV server? Asking them takes at least a month right before XMAS...

Am I doing all steps correctly or is there something else I have to do to mark an email to get replaced? I assume there is something missing because when I mark one for unarchiving with my addin and then mark one with the EV http-only addin my marked email is not replaced (only the icon changes) but the original one is.

Thanks!

Max 

TonySterling
Moderator
Moderator
Partner    VIP    Accredited Certified

Hi Max,

You will need to work with the EV Admin as it needs to be ran on the EV server. They should know how to run the trace.

Regards,

Rob_Wilcox1
Level 6
Partner
One question ... Why do you want to write a custom HTTP add-in to do this ... the 10.0.4 Addin (for example) does this and more, via HTTP.
Working for cloudficient.com

MaxMelcher
Level 3

The answer is simplicity or User Experience.

The reason why I have to write it is that my addin upload emails to SharePoint - the user can select several hundred emails. If there are vaulted mails, its "too complicated" for the enduser to first unvault and then upload. One step would be easier.

So can you point me to the missing step?

MaxMelcher
Level 3

Its really not possible in a large organization to get the guy responsible for EV - maybe he has left the company already... as I traced the http communication of the http addin, there is no more steps involved over HTTP. It has to be something that happens with the mail item - can you please point me in the right direction? 

Thanks!

Max

Rob_Wilcox1
Level 6
Partner

You also need to set the action time stamp property, which is a property that the server side looks for in order to perform the restore request.  The restore request sent via HTTP also passes that property. Then the server side will need to be traced (as mentioned earlier) to see if it is then actioning things correctly. [It takes in the parameters off the HTTP request and will look for messages in a particular mailbox/archive and for that all import time stamp]

Working for cloudficient.com

MaxMelcher
Level 3

Hi Rob,

I thought so - here is a request that my addin does:

http://xxxx/EnterpriseVault/clientaction.asp?act=4&fdrenc=_&dn=OU&svr=xxxx&sid=xxxxevault&tsp=2014-01-10T15:14:51&pdl=xxxx
 
Parameters:
 
act = 4
fdrenc = _
dn = http_encoded(DN of User)
svr = exchange server
sid = static string
tsp = is this the action timestamp you mentioned? 
pdl = static string
 
The tsp timestamp is the last modified property of the mailitem, right? 
 
I compared the fiddler request of the http addin compared to my addin - 100% identically. But apparently no restore.
I assume that I am missing a property on the mail item or something I have to do with it:
 
1. I change the message class
2. I do the http get as explained above
 
Whats missing? Any pointers? I have the feeling that its only a tiny thing but I am stuck... 
 
Thanks again!
Max

MaxMelcher
Level 3

Okay, a step further. Rob helped me figure out that I need to set the property "Action Time Stamp".

Now I need to figure out how the parameter "pdl" is set - I assume this is the folder. Is that correct? How to generate that value? 

Thanks!

Max