dotnet SmtpClient should not be used

I am very late to the party, but today I learned that the good old dotnet SmptClient is considered obsolete and should not be used. Quoting the documentation:

We don’t recommend using the SmtpClient class for new development because SmtpClient doesn’t support many modern protocols. Use MailKit or other libraries instead. (source)

Interestingly, Microsoft is recommending a third-party open-source library as an alternative. I hope we’ll see more of that in the future.

I just finished integrating MailKit in our backend. I must say that I’m pleasantly surprised by its rich feature-set and the elegant and straightforward design, which makes getting on-board super easy. It’s built on top of the excellent MimeKit, after all, and authored by the very same author Jeffrey Stedfast.

Subscribe to the newsletter, the RSS feed, or follow @nicolaiarocci on Twitter