Sending SMS via sms24x7 API. For more details see http://sms24x7.ru/api/
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install sms24x7
In the begining, you need to register for sending SMS through sms24x7 gateway.
There are two ways for sending your SMS.
The first - it's sending a SMS to one recipient. To do this, use:
SmsApi.push_msg_nologin('email@example.com', 'your_password', 'recipient_phone', 'sms_text', params)
recipient_phone - is a phone number in format '7xxxyyyzzzz' and
params - additional params that you can see in documentation.
The second way - it's sending multiple SMS to multiple recipients.
SmsApi.login('firstname.lastname@example.org', 'your_password') recipient_phones_str_arr.each do |recipient_phone| SmsApi.push_msg(recipient_phone, 'sms_text', params) end
recipient_phones_str_arr - it's array that consist phone numbers as strings in format that represented above.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Added some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request