acts_as_sms
This plugin enables you to send SMS and receive delivery reports by integrating with Cellsynt’s SMS gateway via a simple proprietary HTTP interface.
DESCRIPTION:
Rails plugin for integrating with Cellsynt’s SMS gateway via HTTP interface.
SYNOPSIS:
class ShortMessage < ActiveRecord::Base
acts_as_sms
end
You can also pass default values for :message_type, :originator_type, :originator, :allow_concat, :message_type => ‘text’ to the acts_as_sms method.
class DeliveryReceipt < ActiveRecord::Base
belongs_to :short_message
end
sms = ShortMessage.new :destination => “0046707123123”, :body => “Message to send” sms.valid? # => true, the send it sms.send_message # send_message will also run validation and save it.
sms.sent? # => is true if received tracking id from sms gateway.
If callback from sms gateway is enabled. you are able to track the status for of the message.
sms.delivered? sms.buffered? sms.failed?
REQUIREMENTS:
httparty
INSTALL:
Install the plugin with script/plugin install git://github.com/jnstq/acts_as_sms.git
if httpary gem is missing run
rake gems:install
Create migrations, models and controllers ./script/generate short_message_service short_message delivery_receipt Run the pending migrations rake db:migrate
Open config/short_message.yml and enter your account settings for cellsynt sms service. Login to sms.cellsynt.net, under integration set your delivery receipt url to yourdomain.com/delivery_receipts/report.
Restart your server and browse to /short_messages, you should now be able to send sms.
LICENSE:
(The MIT License)
Copyright © 2008 Jon Stenqvist
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.