Windows service sending SMTP mail using Oauth2 authentication

Please can someone help with a project I have to allow a Windows service to send SMTP emails to Office 365 using Oauth2 authentication. I have tried all of your examples and I just can’t make them work for me. I anyone has any working code in c#/vb.net I would be very grateful.

Roo

@roo

Modern authentication (i.e. oAuth2 ) has been supported by EWS. Please read the following Aspose.Email article for more detail.
Access Mail Services using OAuth