WebDAV .NET for Exchange > Tutorial > Use callback to monitor for new mail

Here is an example how to use callbacks. When you subscribe for an event than you can specify callback address and listen on that address in order to be notified when an event occurs. Callback uses UDP protocol and you will be notified immediately after event occurs. In the example below we first subscribe to monitor Inbox folder for incoming messages. Method Listen represents a little UDP server and here we listen for Exchange server response. When new mail arrives then Exchange server will notify you immediately.

C# example
VB example