Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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[1];
DistinguishedFolderIdType folderId = new DistinguishedFolderIdType();
folderId.Id = DistinguishedFolderIdNameType.inbox;
folders[0] = folderId;
pushSubscription.FolderIds = folders;
NotificationEventTypeType[] eventTypes = new NotificationEventTypeType[6];
eventTypes[0] = 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?

share|improve this question
add comment

1 Answer

Change the folder!

With a user we have full access on the other.

BaseFolderIdType[] folders = new BaseFolderIdType[1];

DistinguishedFolderIdType  folders[0] = new DistinguishedFolderIdType();

folders[0].Id = DistinguishedFolderIdNameType.inbox;
folders[0].Mailbox = New EmailAddressType()
folders[0].Mailbox.EmailAddress = "demo@demo.fr"

pushSubscription.FolderIds = folders;
share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.