Resend 0.0.6

There is a newer version of this package available.
See the version list below for details.
dotnet add package Resend --version 0.0.6                
NuGet\Install-Package Resend -Version 0.0.6                
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="Resend" Version="0.0.6" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Resend --version 0.0.6                
#r "nuget: Resend, 0.0.6"                
#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.
// Install Resend as a Cake Addin
#addin nuget:?package=Resend&version=0.0.6

// Install Resend as a Cake Tool
#tool nuget:?package=Resend&version=0.0.6                

resend

CI NuGet

.NET client for resend, an email API, written in C#.

Installing via NuGet

Package is published in the NuGet gallery.

From the command-line:

> dotnet add package Resend

From within Visual Studio using Package Manager Console:

PM> Install-Package Resend

Getting started

In the startup of your application, configure the DI container as follows:

using Resend;

builder.Services.AddOptions();
builder.Services.AddHttpClient<ResendClient>();
builder.Services.Configure<ResendClientOptions>( o =>
{
    o.ApiToken = Environment.GetEnvironmentVariable( "RESEND_APITOKEN" )!;
} );
builder.Services.AddTransient<IResend, ResendClient>()

Send an email using the injected IResend instance:

using Resend;

public class FeatureImplementation
{
    private readonly IResend _resend;


    public FeatureImplementation( IResend resend )
    {
        _resend = resend;
    }


    public Task Execute()
    {
        var message = new EmailMessage();
        message.From = "onboarding@resend.dev";
        message.To.Add( "myapp@example.com" );
        message.Subject = "Hello!";
        message.HtmlBody = "<div><strong>Greetings<strong> 👋🏻 from .NET</div>";

        await _resend.EmailSendAsync( message );
    }
}

resend command-line tool

In addition to the .NET library, this repository also releases a cross platform command line interface program to invoke the API. This program is available as a .NET tool.

0.1.0

Command-line tool for Resend API

Usage: resend [command] [options]

Options:
  --version     Show version information.
  -?|-h|--help  Show help information.

Commands:
  api-key       API key management
  domain        Email (sender) domain management
  email         Send emails
  webhook       Webhook management

Run 'resend [command] -?|-h|--help' for more information about a command.

Each command has sub-commands: you can enumerate the sub-commands with the --help flag, eg resend email --help.

Roadmap

  • Check if there is API for webhooks (client side, as well as server side)
  • Write documentation in the README.md
  • Return ApiResponse<T> (rather than T), for folks that prefer responses rather than exceptions
  • Complete the API / object XML documentation
  • Target multiple frameworks (.NET Standard, .NET 6) -- rather than .NET 7
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.0.8 722 10/28/2024
0.0.7 10,005 3/7/2024
0.0.6 188 3/5/2024
0.0.5 3,894 7/31/2023