Pergunta

I have a streaming notifications listener that's subscribed to multiple mailboxes. When a creation notification comes in, I bind to the created item to try to learn more about it.

I try to look at the ParentDirectoryID.Mailbox to try to figure out where the item is being created in, but it's null. The API says that the Folder ID and the FolderName/Mailbox properties are mutually exclusive.

So, how do I load the FolderName/Mailbox properties?

Foi útil?

Solução

I suggest you should go with the following approach to solve your problem:

  1. You can maintain a List or Dictionary (it's up to you) to store entries of SubscriptionId and MailBox at the time of subscription, once you received notification, extract SubscriptionId and map to your stored List/Dictonary to get mailbox.

This solution is convenient if you don't need any extra details from Exchange, as is makes fewer calls to Exchange.

  1. You can get MailBox details from passing ExtendedPropertyDefination details and make call using extracted ItemId from notification.

I believe you get both of the approaches.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top