Open Closed

SmtpClient shouldn't be used #3846


User avatar
0
cfd000 created
  • 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)
  • User Avatar
    -1
    malik.masis created

    Hi,

    Could you have a look at this related documentation, please?

    Regards.

  • User Avatar
    -2
    cfd000 created

    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?

  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    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.

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11