ftos.messaging.sendSMS
IMPORTANT!
Starting with v24.3.0, this is renamed from server.messaging.sendSMS to ftos.messaging.sendSMS.
Starting with v24.3.0, this is renamed from server.messaging.sendSMS to ftos.messaging.sendSMS.
Sends an SMS message.
This is suitable for business logic modules of business service components.
Syntax
Copy
function ftos.messaging.sendSMS(phoneNumber: string, message: string, {from: string, provider: "GatewaySmsOTP"|"FtosApiSms"}): void
| Parameter | Type | Description |
|---|---|---|
phoneNumber
|
string | Telephone number of the recipient. IMPORTANT! The telephone number must include the country dialing code. |
message
|
string | Contents of the SMS message. |
from (optional) |
string | String containing the sender information that will be included in the SMS message. |
provier
|
"GatewaySmsOTP"|"FtosApiSms" |
|
Examples
In this example:
- We send an SMS message to +40123456789.
- The message reads: Your payment has been received.
- The message sender is MyBusiness Ltd.
- The message is sent immediately using the preconfigured SMS service provider (FtosApiSms).
Copy
ftos.messaging.sendSMS("+40123456789", "Your payment has been received.", {"provider": "FtosApiSms", "from": "MyBusiness Ltd."});