SmsClient.Send Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Send(String, IEnumerable<String>, String, SmsSendOptions, CancellationToken) |
Sends an SMS message from a phone number that belongs to the authenticated account. |
Send(String, String, String, SmsSendOptions, CancellationToken) |
Sends a SMS |
Send(String, IEnumerable<String>, String, SmsSendOptions, CancellationToken)
- Source:
- SmsClient.cs
- Source:
- SmsClient.cs
Sends an SMS message from a phone number that belongs to the authenticated account.
public virtual Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Communication.Sms.SmsSendResult>> Send (string from, System.Collections.Generic.IEnumerable<string> to, string message, Azure.Communication.Sms.SmsSendOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member Send : string * seq<string> * string * Azure.Communication.Sms.SmsSendOptions * System.Threading.CancellationToken -> Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Communication.Sms.SmsSendResult>>
override this.Send : string * seq<string> * string * Azure.Communication.Sms.SmsSendOptions * System.Threading.CancellationToken -> Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Communication.Sms.SmsSendResult>>
Public Overridable Function Send (from As String, to As IEnumerable(Of String), message As String, Optional options As SmsSendOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of IReadOnlyList(Of SmsSendResult))
Parameters
- from
- String
The sender's phone number in E.164 format that is owned by the authenticated account.
- to
- IEnumerable<String>
The recipient's phone number in E.164 format. In this version, up to 100 recipients in the list is supported.
- message
- String
The contents of the message that will be sent to the recipient. The allowable content is defined by RFC 5724.
- options
- SmsSendOptions
Optional configuration for sending SMS messages.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
The server returned an error. See Message for details returned from the server.
message
is null.
Applies to
Send(String, String, String, SmsSendOptions, CancellationToken)
- Source:
- SmsClient.cs
- Source:
- SmsClient.cs
Sends a SMS from
a phone number that is acquired by the authenticated account, to
another phone number.
public virtual Azure.Response<Azure.Communication.Sms.SmsSendResult> Send (string from, string to, string message, Azure.Communication.Sms.SmsSendOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member Send : string * string * string * Azure.Communication.Sms.SmsSendOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Communication.Sms.SmsSendResult>
override this.Send : string * string * string * Azure.Communication.Sms.SmsSendOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Communication.Sms.SmsSendResult>
Public Overridable Function Send (from As String, to As String, message As String, Optional options As SmsSendOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of SmsSendResult)
Parameters
- from
- String
The sender's phone number that is owned by the authenticated account.
- to
- String
The recipient's phone number.
- message
- String
The contents of the message that will be sent to the recipient. The allowable content is defined by RFC 5724. If the message has more than 160 characters, the server will split it into multiple SMSs automatically.
- options
- SmsSendOptions
Optional configuration for sending SMS messages.
- cancellationToken
- CancellationToken
The cancellation token for the underlying request.
Returns
Exceptions
The server returned an error. See Message for details returned from the server.
message
is null.