In this article I will explain with an example, how to install MailKit from Nuget in Visual Studio 2013, 2015, 2017, 2019 and 2022.
Installing MailKit package
You will need to install the MailKit package using the following command.
Install-Package MailKit -Version 4.3.0
Once the MailKit is successfully installed, you will need to import the MimeKit and MailKit.Net.Smtp namespaces.
As you can see, the MailKit class is available to use.