Sendio 1.0.0

dotnet add package Sendio --version 1.0.0
                    
NuGet\Install-Package Sendio -Version 1.0.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="Sendio" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sendio" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Sendio" />
                    
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 Sendio --version 1.0.0
                    
#r "nuget: Sendio, 1.0.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 Sendio@1.0.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=Sendio&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Sendio&version=1.0.0
                    
Install as a Cake Tool

send.io .NET SDK

NuGet License: MIT

The official .NET library for the send.io email API. Targets .NET 8 and .NET 10 (apps on .NET 9 use the .NET 8 build).

Full API reference: https://developer.send.io/docs/api

Install

dotnet add package Sendio

Optional companion packages:

  • Sendio.Webhooks: ASP.NET helpers to receive and verify send.io webhook events
  • Sendio.FluentEmail: a FluentEmail sender

Quick start

Create an API key in the send.io dashboard (keys start with mx_).

Without dependency injection:

using Sendio;

ISendio sendio = SendioClient.Create( "mx_123" );   // or SendioClient.Create() to read SENDIO_API_KEY

var resp = await sendio.EmailSendAsync( new EmailMessage()
{
    From = "Acme <onboarding@yourdomain.com>",
    To = "delivered@send.io",
    Subject = "Hello from .NET",
    HtmlBody = "<strong>It works!</strong>",
} );

Console.WriteLine( resp.Content );   // email id

With dependency injection (ASP.NET Core and generic host):

using Sendio;

builder.Services.AddSendio( o =>
{
    o.ApiToken = builder.Configuration["Sendio:ApiKey"]!;   // omit to use SENDIO_API_KEY
} );

// or simply:
builder.Services.AddSendio( "mx_123" );

Then inject ISendio:

public class Signup( ISendio sendio )
{
    public Task Welcome( string to ) => sendio.EmailSendAsync( new EmailMessage()
    {
        From = "Acme <onboarding@yourdomain.com>",
        To = to,
        Subject = "Welcome",
        TextBody = "Thanks for signing up!",
    } );
}

Send a batch

Up to 100 emails in one request:

var resp = await sendio.EmailBatchAsync( new[]
{
    new EmailMessage() { From = "Acme <onboarding@yourdomain.com>", To = "delivered@send.io", Subject = "First",  TextBody = "one" },
    new EmailMessage() { From = "Acme <onboarding@yourdomain.com>", To = "delivered@send.io", Subject = "Second", TextBody = "two" },
} );

foreach ( var id in resp.Content )
    Console.WriteLine( id );

Retrieve an email

var email = await sendio.EmailRetrieveAsync( emailId );

Console.WriteLine( $"{email.Content.Subject} {email.Content.LastEvent}" );

Domains

var added = await sendio.DomainAddAsync( "yourdomain.com" );
await sendio.DomainVerifyAsync( added.Content.Id );

var domains = await sendio.DomainListAsync();

foreach ( var d in domains.Content )
    Console.WriteLine( $"{d.Name} {d.Status}" );

Mailboxes

Mailboxes are real email accounts with an IMAP/SMTP login. The login is only returned on creation (when IMAP/SMTP is ready) and on a password reset; the password is also an API key for that mailbox.

// The domain must be verified.
var mailbox = await sendio.MailboxCreateAsync( new MailboxData() { Address = "sales@yourdomain.com" } );

if ( mailbox.Content.Credentials != null )
    Console.WriteLine( $"{mailbox.Content.Credentials.Smtp.Host} {mailbox.Content.Credentials.Password}" );

await sendio.MailboxUpdateAsync( mailbox.Content.Id, new MailboxUpdateData() { WarmupEnabled = false } );

// The old password stops working.
var reset = await sendio.MailboxResetPasswordAsync( mailbox.Content.Id );

var mailboxes = await sendio.MailboxListAsync();

foreach ( var m in mailboxes.Content )
    Console.WriteLine( $"{m.Address} {m.Health}" );

// Removes the email account, and the agent inbox on it, if any.
await sendio.MailboxDeleteAsync( mailbox.Content.Id );

ISendio also covers emails (schedule, cancel, list, attachments), receiving (inbound), API keys, audiences, contacts, contact properties, segments, topics, broadcasts, templates, webhooks, events, automations, suppressions, logs, metrics and usage.

Configuration

Setting In code (SendioClientOptions) Environment variable Default
API key ApiToken SENDIO_API_KEY none (required)
Base URL ApiUrl SENDIO_BASE_URL https://api.send.io

Values set in code win over the environment. To point at another environment (for example a local test server):

var sendio = SendioClient.Create( new SendioClientOptions()
{
    ApiToken = "mx_123",
    ApiUrl = "http://localhost:8080",
} );

Every request carries the User-Agent: sendio-dotnet:<version> header.

Error handling

By default a failed call throws SendioException, which carries the HTTP status code, the API error type and the rate limit headers:

try
{
    await sendio.EmailSendAsync( message );
}
catch ( SendioException ex )
{
    Console.WriteLine( $"{ex.StatusCode} {ex.ErrorType}: {ex.Message}" );
}

Set ThrowExceptions = false in SendioClientOptions to get a SendioResponse with Success == false and an Exception property instead.

License

MIT. See LICENSE and NOTICE.

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 (2)

Showing the top 2 NuGet packages that depend on Sendio:

Package Downloads
Sendio.Webhooks

ASP.NET utilities for send.io webhook events

Sendio.FluentEmail

FluentEmail sender for the send.io email API

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 61 11/12/2026