How to Reference the Mailjet .NET Class Library
The Mailjet NuGet Package is an easy way to retrieve the Mailjet API and configure your application with all dependencies. NuGet is a Visual Studio extension that facilitates installing and updating tools and libraries. It is included with Microsoft Visual Studio 2015 and above.
To install NuGet when running an earlier version than Microsoft Visual Studio 2015, please visit http://www.nuget.org and click on Install NuGet.
To install the Mailjet NuGet package, follow these instructions:
In Visual Studio, click on ‘New Project’, then choose a Template.
In Visual Studio, go to ‘Tools’ → ‘NuGet Package Manager’ → ‘Package Manager Console’ to open the Console.
Select the Project from the ‘Default Project’ menu, then enter ‘Install-Package Mailjet.Api’ in the Console to install it.
Once installed, you will be able to view the installed dependency under ‘Dependencies’ → ‘NuGet’ → ‘Mailjet.Api’.
Mailjet.Api is the name of Mailjet’s .NET class library. It contains the following namespaces:
Add the following code namespace declarations at the start of a C# file, in which you want to programmatically access the Mailjet Email Service.
using Mailjet.Client; using Mailjet.Client.Resources;