NG send_sms

You could send SMS message with the aid of the send_sms instance method.

def send_sms to, message, from=nil

Code example 1 - Definition

Method parameters

Parameter name Value Description Default value Mandatory
to string value
e.g. '06123456789'
Recipient of the SMS message. (None) Yes
message string value,
e.g. 'Hello world!'
The content of the SMS message. (None) Yes
from string value
e.g. 'admin'
Sender of the SMS message. Empty string No

Example

ng = NG.new '192.168.0.1', 'admin', 'password'
ng.send_sms '06123456789', 'Ni hao'

Code example 2 - Send an SMS message with instance method

More information