SMS self.ng_send_sms

Class method to send an SMS message through Ozeki NG SMS Gateway.

def ng_send_sms to, message, from=nil

Code example 1 - Definition

Method parameters

Parameter name Value Description Default value Mandatory
ng_ip_address string value
e.g. '192.168.0.1'
IP address of Ozeki NG SMS Gateway. (None) Yes
username string value,
e.g. 'admin'
The username to connect Ozeki NG SMS Gateway. (None) Yes
password string value,
e.g. 'password'
The password for the given username. (None) Yes
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
port int value
e.g. 9501
The Ozeki NG SMS Gateway listener port. 9501 No
from string value
e.g. 'admin'
Sender of the SMS message. Empty string No

Example

puts sms.ng_send_sms '192.168.0.1', 'admin', 'password', '06123456789', 'Ni hao'

Code example 2 - Send an SMS message with class method

More information