mailserveI working with the Exchange 2010 Push Notification Service. I'd like to log when specific users receive email. I will not have the usernames and passwords for each user but will have credentials to an account that has access to each user's inbox.
I'm able to be notified of the credential'd user's inbox receiving new messages but I'd like to be notified of other specific users.
Here's the code I have:
ExchangeServiceBinding esb = new ExchangeServiceBinding(); esb.Url = "https://mail01/EWS/exchange.asmx"; esb.Credentials = new NetworkCredential("username", "password", "domain"); SubscribeType subscribeRequest = new SubscribeType(); PushSubscriptionRequestType pushSubscription = new PushSubscriptionRequestType(); // Subscribe to events in the inbox folder. BaseFolderIdType folders = new BaseFolderIdType; DistinguishedFolderIdType folderId = new DistinguishedFolderIdType(); folderId.Id = DistinguishedFolderIdNameType.inbox; folders = folderId; pushSubscription.FolderIds = folders; NotificationEventTypeType eventTypes = new NotificationEventTypeType; eventTypes = NotificationEventTypeType.NewMailEvent; pushSubscription.EventTypes = eventTypes; // Receive push notifications every 1 minutes. pushSubscription.StatusFrequency = 1; // Identify the location of the client Web service. pushSubscription.URL = "http://webserver/PushNotificationClient/Service.asmx"; // Form the subscribe request. subscribeRequest.Item = pushSubscription; // Send the subscribe request and get the response. SubscribeResponseType subscribeResponse = esb.Subscribe(subscribeRequest);
What I'd like to do is have a way to set the inbox to another user's inbox. Is there any way to do this?