Zolotov.Samotpravil
1.0.0
dotnet add package Zolotov.Samotpravil --version 1.0.0
NuGet\Install-Package Zolotov.Samotpravil -Version 1.0.0
<PackageReference Include="Zolotov.Samotpravil" Version="1.0.0" />
<PackageVersion Include="Zolotov.Samotpravil" Version="1.0.0" />
<PackageReference Include="Zolotov.Samotpravil" />
paket add Zolotov.Samotpravil --version 1.0.0
#r "nuget: Zolotov.Samotpravil, 1.0.0"
#:package Zolotov.Samotpravil@1.0.0
#addin nuget:?package=Zolotov.Samotpravil&version=1.0.0
#tool nuget:?package=Zolotov.Samotpravil&version=1.0.0
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 | Versions 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. |
-
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 |