Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need your help in one of my project requirement.

My requirement is to send mail from our .net Application. So when user want to send mail then first the user should be redirected to the microsoft sign-in page (e.g https://login.microsoftonline.com/login.srf ) where the user can enter the corporate credential and from there after successful login it should return a token. Then from that token we need to retrieve the user's mailid.

Then we can pass that mailid along with the Token to generate the oAuth object and then authenicate that Oauth object and then after successful authentication we can send mail.

Below links are giving me some idea but I am not sure how to redirect user to sign-in page and after successful sign-in how to capture the Token.

c# - SMTP and OAuth 2 - Stack Overflow[^]

https://github.com/jstedfast/MailKit/blob/master/ExchangeOAuth2.md

Any kind help is greatly appreciated. Any sample code will be of great help.

What I have tried:

Tried the above links but no luck yet. So Need help.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900