Curiosus.SMS.Smsc 3.0.0

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

Curiosus.SMS.Smsc

NuGet Downloads Coverage

ISmsSender implementation for SMSC. Use it to send SMS via an smsc.ru account, directly or through Curiosus.Notifications.SMS.

Installation

dotnet add package Curiosus.SMS.Smsc

Usage

SmscOptions requires SmscLogin and SmscPassword; SmscSender (sender name) is optional. For example, bound from configuration:

Smsc:
  SmscLogin: my-login
  SmscPassword: my-password
  SmscSender: MyCompany
var smscOptions = configuration.GetSection("Smsc").Get<SmscOptions>()!;

// registers ISmscSender and, by default, ISmsSender
services.AddSmscSmsSender(smscOptions);
var result = await smsSender.SendSmsAsync("+71234567890", "Hello!", cancellationToken);
if (result.IsSuccess)
{
    var cost = result.Body.Cost;
    var count = result.Body.SmsCount;
}

// per-message credentials or sender name
await smsSender.SendSmsAsync("+71234567890", "Hello!", new SmscExtraParams("other-login", "other-password", null));

Pass useAsDefaultSender: false to register only ISmscSender (e.g. when another provider is the default ISmsSender).

Notes:

  • SMSC error codes are mapped to SmsError (Auth, NoMoney, RateLimit, DeliveryError, Unknown); the raw SMSC response is available in SmsSentResult.ResponseJson.
  • If SMSC rejects a message because of the sender name (error 6), the sender retries once without the sender name.

HTTP requests go through the HttpClient named SmscSender.HttpClientName from IHttpClientFactory, which AddSmscSmsSender registers. Configure it for timeouts, a proxy or resilience handlers:

services.AddHttpClient(SmscSender.HttpClientName, client => client.Timeout = TimeSpan.FromSeconds(30));

See also

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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

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
3.0.0 32 10/3/2026
2.0.0 59 9/28/2026