UseSend 1.5.0

dotnet add package UseSend --version 1.5.0
                    
NuGet\Install-Package UseSend -Version 1.5.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="UseSend" Version="1.5.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="UseSend" Version="1.5.0" />
                    
Directory.Packages.props
<PackageReference Include="UseSend" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add UseSend --version 1.5.0
                    
#r "nuget: UseSend, 1.5.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package UseSend@1.5.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=UseSend&version=1.5.0
                    
Install as a Cake Addin
#tool nuget:?package=UseSend&version=1.5.0
                    
Install as a Cake Tool

useSend .NET SDK

NuGet

.NET client for the useSend email API. useSend is an open-source alternative to Resend, SendGrid, Mailgun and Postmark.

Installation

dotnet add package UseSend

Quick Start

With Dependency Injection (ASP.NET Core)

// Program.cs
builder.Services.AddUseSend("us_your_api_token");

// In your service/controller — inject IUseSend or a specific service interface
public class WelcomeSender(IUseSend useSend)
{
    public async Task SendWelcomeAsync(string to)
    {
        var response = await useSend.Emails.SendAsync(new EmailMessage
        {
            From    = "noreply@yourdomain.com",
            To      = to,
            Subject = "Welcome!",
            Html    = "<h1>Welcome aboard!</h1>",
        });

        if (response.Success)
            Console.WriteLine($"Email sent: {response.Content}");
    }
}

// Or inject only the service interface you need
public class DomainChecker(IEmailService emails, IDomainService domains) { ... }

Self-Hosted useSend

builder.Services.AddUseSend(options =>
{
    options.ApiToken = "us_your_api_token";
    options.ApiUrl   = "https://send.mycompany.com/api/"; // your self-hosted instance
});

Without Dependency Injection

var client = UseSendClient.Create("us_your_api_token");

var response = await client.Emails.SendAsync(new EmailMessage
{
    From    = "noreply@yourdomain.com",
    To      = "user@example.com",
    Subject = "Hello",
    Text    = "Hello from useSend!",
});

Environment Variable

If you prefer not to hardcode your token, set the USESEND_API_KEY environment variable and create the client with no arguments:

var client = UseSendClient.Create(); // reads USESEND_API_KEY

Features

Resource Operations
Emails Send, Batch send (both with idempotency), Get, List, Cancel schedule, Update schedule
Domains List, Create, Get, Delete, Verify
Contacts Create, Get, List, Update, Upsert, Delete, Bulk create, Bulk delete
Contact Books List, Create, Get, Update, Delete
Campaigns Create, Get, List, Delete, Schedule, Pause, Resume
Analytics Email time series, Reputation metrics

Examples

Authentication

All API calls require a Bearer token. Create one in your useSend Developer Settings.

Error Handling

By default, failed API calls throw a UseSendException. To receive errors as return values instead:

builder.Services.AddUseSend(options =>
{
    options.ApiToken        = "us_your_api_token";
    options.ThrowExceptions = false;
});

var response = await useSend.Emails.SendAsync(email);

if (!response.Success)
    Console.WriteLine($"Error {response.Exception!.StatusCode}: {response.Exception.ApiError}");

API Reference

Full API documentation: docs.usesend.com/api-reference

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on UseSend:

Package Downloads
UseSend.FluentEmail

.NET client for useSend mail API

UseSend.Razor

.NET client for useSend mail API

UseSend.Fluid

.NET client for useSend mail API

UseSend.OpenTelemetry

.NET client for useSend mail API

UseSend.Identity

.NET client for useSend mail API

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.5.0 78 5/31/2026
1.4.0 79 5/29/2026
1.3.0 108 5/28/2026
1.2.0 194 5/28/2026