Send Email with MailKit in .NET

Posted by Joe Enos on January 27, 2021 · 1 min read

Using MailKit to send email in .NET. The old way with SmtpClient, which was much simpler, is now deprecated in favor of this.

For a more thorough example with proper dependency injection and ASP.NET configuration, see this link.

View code in GitHub