Open Closed

SmtpClient shouldn't be used #3846

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.


Additionally, Office 365 is going to disable basic authentication for SMTP as of December 31, 2022.

All of the documentation indicates that 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
    malik.masis created
    Support Team


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


  • -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?

  • 0
    enisn created
    Support Team

    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.