Zolotov.Samotpravil 1.0.0

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

Samotpravil for .NET

An asynchronous C# client for the Samotpravil email API. API details are available in the Samotpravil REST API documentation.

Requirements

  • .NET 8.0 or .NET 10.0
  • A Samotpravil API key

Install

dotnet add package Zolotov.Samotpravil

Usage

using samotpravil;

using var client = new SamotpravilClient("your-api-key");

var result = await client.SendEmailAsync(
    emailTo: "recipient@example.com",
    subject: "Hello",
    messageText: "<p>Your message</p>",
    emailFrom: "info@example.com",
    options: new SendEmailOptions
    {
        NameFrom = "Example",
        TrackOpen = true,
        Params = new Dictionary<string, object?>
        {
            ["first_name"] = "Alex"
        }
    });

Console.WriteLine(result);

The client supports cancellation tokens on every API call. You can inject an HttpClient and optionally override the API base address for testing or custom environments:

using var client = new SamotpravilClient(
    "your-api-key",
    httpClient: httpClient,
    baseAddress: new Uri("https://api.samotpravil.com/"));

An injected HttpClient remains owned by the caller. A client-created HttpClient is disposed when SamotpravilClient is disposed.

Available operations

All methods are asynchronous and return the decoded API response as a JsonElement.

Method Operation
SendEmailAsync Send an email, with optional tracking, template and header fields
GetStatusAsync Get status for sent email(s)
GetStatisticsAsync Get sent-email statistics by date range
GetNonDeliveryByDateAsync Get the non-delivery report by date range
GetFblReportByDateAsync Get the FBL report by date range
StopListSearchAsync Search for an email address in the stop list
StopListAddAsync Add an email address to the stop list
StopListRemoveAsync Remove an email address from the stop list
GetDomainsAsync List allowed sender domains
DomainAddAsync Add an allowed sender domain
DomainRemoveAsync Remove an allowed sender domain
DomainCheckVerificationAsync Check domain verification

Date-range methods accept dateFrom and dateTo in YYYY-MM-DD format and have optional limit (default 100) and cursorNext (default 0) pagination arguments.

GET arguments are encoded as URL query parameters. POST arguments are sent as JSON. Non-success HTTP responses throw HttpRequestException; API responses whose status is not OK throw SamotpravilApiException.

Build and test

dotnet test
dotnet pack samotpravil/samotpravil.csproj -c Release

License

MIT

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.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.

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
1.0.0 82 10/2/2026