I have a service that runs under LocalSystem account and I need access to MAPI which requires to impersonate LocalSystem with an other user (e.g. user1). Impersonation works back and forth only 3 times, after the forth impersonation (no errors from APIs reported) MapiLogon fails as if I user LocalSystem account. Why only 3 times?
Here is the sequence:
*** Call MAPI sfuff here ***
Again, no errors were reported from all these APIs, just the third time MAPI stuff fails. Why?