- ABP Framework version: v6.0.0
- UI type: MVC / Blazor
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): yes
According to Microsoft documentation, System.Net.Mail.SmtpClient is obsolete and should not be used.
- https://github.com/dotnet/platform-compat/blob/master/docs/DE0005.md
- https://github.com/dotnet/dotnet-api-docs/issues/2986
- https://learn.microsoft.com/en-us/dotnet/api/system.net.mail.smtpclient?view=net-6.0
Additionally, Office 365 is going to disable basic authentication for SMTP as of December 31, 2022. https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/deprecation-of-basic-authentication-exchange-online
All of the documentation indicates that MailKit https://github.com/jstedfast/MailKit is now the recommended solution.
I did not see a way to use OAuth2 with MailKit using the ABP module. Is there any sample code that demonstrates how to do this?
3 Answer(s)
-
-1
-
-2
That does not answer the question at all. It is VERY frustrating that each time we open a ticket, the first response is to link to some generic documentation page. Did you actually read the question?
-
0
Currently we have Smtp Sender. We'll consider this topic and plan to make alternative implementations.
If you wish, you can implement your own email sending logic via implementing IEmailSender interface. After replacing that service with your own implementation, the entire application & modules will use your implementation.