Table of Contents

Interface ISmsService

Namespace
Ecng.Net.Sms
Assembly
Ecng.Net.Clients.dll

Represents an SMS service for sending text messages.

public interface ISmsService
Extension Methods

Methods

SendAsync(string, string, CancellationToken)

Sends an SMS message asynchronously.

Task<string> SendAsync(string phone, string message, CancellationToken cancellationToken = default)

Parameters

phone string

The recipient phone number.

message string

The content of the SMS message.

cancellationToken CancellationToken

A token that may be used to cancel the operation.

Returns

Task<string>

A task that represents the asynchronous operation. The task result contains the response or status returned after sending the message.