How to send email using two factor authentication enabled office365 email account in C#?

0 votes
asked Aug 21, 2020 by apriemyshev (220 points)

1 Answer

0 votes
answered Aug 21, 2020 by Pavel Matyska (15,060 points)


you need to login to office365 using OAuth method. To enable two factor authentication, you have to set it on the server side accordingly. This MSDN doc page and others on MSDN might be useful to start with setting your application and registering it on Microsoft to make it possible to obtain and use OAuth token.