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 and click on Install NuGet.

To install the Mailjet NuGet package, follow these instructions:

  1. In Visual Studio, click on ‘New Project’, then choose a Template.

    Visual Studio New Project

  2. In Visual Studio, go to ‘Tools’ → ‘NuGet Package Manager’ → ‘Package Manager Console’ to open the Console.

    Package Manager Console

  3. Select the Project from the ‘Default Project’ menu, then enter ‘Install-Package Mailjet.Api’ in the Console to install it.

    Install Mailjet Library

  4. Once installed, you will be able to view the installed dependency under ‘Dependencies’ → ‘NuGet’ → ‘Mailjet.Api’.

Library Installed

Mailjet.Api is the name of Mailjet’s .NET class library. It contains the following namespaces: - Mailjet.Client - Mailjet.Client.Resources

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;