Twilio SMS client wrapper for Outbox.
Add this line to your application's Gemfile:
gem 'outbox-twilio'
And then execute:
$ bundle
Or install it yourself as:
$ gem install outbox-twilio
Configure Outbox to use Outbox::Twilio as the default SMS client:
Outbox::Messages::SMS.default_client(
:twilio,
account_sid: 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
auth_token: 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy',
# Supports other Twilio::REST::Client options:
timeout: 30,
retry_limit: 1
)
SMS messages will now use the Twilio API for devlivery:
sms = Outbox::Messages::SMS.new(
from: '+15551115555',
body: 'Hello World',
# supports Twilio's non-standard parameters:
media_url: 'https://www.example.com/hearts.png'
)
sms.deliver('+15552224444')
- Fork it ( https://github.com/localmed/outbox-twilio/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request