OPS send_sms

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

def send_sms to, message, from=nil, delivery_report_url=nil

Code example 1 - Definition

Method parameters

to string value
e.g. '1469'
Recipient of the SMS message. (None) Yes
message string value
e.g. 'Hello world!'
Content of the SMS message. (None) Yes
from string value
e.g. '1469'
Sender of the SMS message. Empty string No
delivery_report_url string value
e.g. 'http://yourapp.com/smsdelivered.php'
URL that will be requested with delivery details when delivery report arrives to this message. Empty string No

Example

ops = OPS.new '192.168.0.1', nil, '9999', 'admin', 'password'
puts ops.send_sms '2000', 'Ni hao ma?'

Code example 2 - Send an SMS message with instance method

More information