I am using a streaming subscription (EWS Managed API) to subscribe to events on one mailbox. Now, instead of doing this directly, I want to subscribe and take action on incoming mails on these mailboxes through impersonation. How to achieve it?
What I have Tried:
I did setup multiple streaming subscriptions using service.ImpersonatedUserId()
but when i get a event(i get events successfully for the 2 mailboxes i have subscribed to) and try to take some action for e.g EmailMessage.Bind(Item Id)
or Folder.Bind()
, the code stucks! I dont get any error message. I even tried TraceEnabled= true
, I found nothing!
I did see this MSFT link but didn't find an answer. I need help with for e.g moving the mail to another folder for multiple mailboxes through EWS subscriptions.