Hi all,
I am working on reading mail from outlook by EWS push notification subscription.
I have done subscription with SubscribeToPushNotifications(IEnumerable<folderid>, Uri, Int32, String, EventType[]) also received the subscription id successfully.
Here,
- FolderID is Inbox,
- Uri - my .net core rest webservice with get and post action methods
- interval is 1
- watermark given empty string
- EventType is Created
Here I am not sure how the web service should be written and how to receive / read the push notification.
Any leading would be very greatfull!!
Thank you in advance!!!
What I have tried:
ExchangeWebService service = new ExchangeWebService();
service.Credentials("username","password");
service.Url("Outlook/EWS/webservice.asmx")
service.SubscribeToPushNotifications(IEnumerable<folderid>, Uri, Int32, String, EventType[])
-----------------------------------
Web Service
-----------
[HttpGet]
[Route("api/[controller]")
public IActionResult ReceivePushNotification()
{
return Ok();
}
[HttpPost]
[Route("api/[controller]")
public IActionResult ReceivePushNotification()
{
return Ok();
}
I am receiving 200 Ok Status When I execute these action methods from Postman. But I want to know how EWS push notification will send the new mail response to web service (what action methods and what format)