共用方式為


SmsAsyncClient Class

  • java.lang.Object
    • com.azure.communication.sms.SmsAsyncClient

public final class SmsAsyncClient

Async client for sending SMS messages with Azure Communication SMS Service.

Method Summary

Modifier and Type Method and Description
Mono<Iterable<SmsSendResult>> send(String from, Iterable<String> to, String message)

Sends an SMS message from a phone number that belongs to the authenticated account.

Mono<SmsSendResult> send(String from, String to, String message)

Sends an SMS message from a phone number that belongs to the authenticated account.

Mono<SmsSendResult> send(String from, String to, String message, SmsSendOptions options)

Sends an SMS message from a phone number that belongs to the authenticated account.

Mono<Response<Iterable<SmsSendResult>>> sendWithResponse(String from, Iterable<String> to, String message, SmsSendOptions options)

Sends an SMS message from a phone number that belongs to the authenticated account.

Methods inherited from java.lang.Object

Method Details

send

public Mono<Iterable<SmsSendResult>> send(String from, Iterable<String> to, String message)

Sends an SMS message from a phone number that belongs to the authenticated account.

Parameters:

from - Number that is sending the message.
to - A list of the recipient's phone numbers.
message - message to send to recipient.

Returns:

response for a successful send Sms request.

send

public Mono<SmsSendResult> send(String from, String to, String message)

Sends an SMS message from a phone number that belongs to the authenticated account.

Parameters:

from - Number that is sending the message.
to - The recipient's phone number.
message - message to send to recipient.

Returns:

response for a successful send Sms request.

send

public Mono<SmsSendResult> send(String from, String to, String message, SmsSendOptions options)

Sends an SMS message from a phone number that belongs to the authenticated account.

Parameters:

from - Number that is sending the message.
to - The recipient's phone number.
message - message to send to recipient.
options - set options on the SMS request, like enable delivery report, which sends a report for this message to the Azure Resource Event Grid.

Returns:

The Sms send result.

sendWithResponse

public Mono<Response<Iterable<SmsSendResult>>> sendWithResponse(String from, Iterable<String> to, String message, SmsSendOptions options)

Sends an SMS message from a phone number that belongs to the authenticated account.

Parameters:

from - Number that is sending the message.
to - A list of the recipient's phone numbers.
message - message to send to recipient.
options - set options on the SMS request, like enable delivery report, which sends a report for this message to the Azure Resource Event Grid.

Returns:

response for a successful send Sms request.

Applies to