Send Text Messages From Rails with SMS Fu

This plugin has been sitting dormant for a while and I haven't had a chance to really write about it since I've been so busy lately. Basically what this is, is just a quick Rails plugin that allows you to send an SMS from your application. This does not require any kind of "gateway" or third-party service to get the job done. The plugin takes in a phone number, the carrier, and a message. From this information, it will format an e-mail correctly that will actually end up being sent to that phone in the form of a text message. How easy is it to use? Very.

You can grab the latest from GitHub.
git clone git://github.com/brendanlim/sms-fu.git vendor/plugins/sms_fu


Supported Carriers: Sorry, International carriers aren't supported at the moment. Alltel, Ameritech, AT&T, BellSouth Mobility, BlueSkyFrog, Boost Mobile, Cellular South, Fido, Metro PCS, PSC Wireless, Qwest, Southern Link, Sprint, Suncom, T-Mobile (US/UK/Germany), Virgin Mobile, Verizon Wireless, Vodafone (UK,Italy,Japan).

Add this one include line to one of your controllers.
class ExampleController < ApplicationController
        has_sms_fu
      end

After this, just edit /config/sms_fu.yml with your custom reply-to address.

The three required parameters are the phone number, carrier, and the message itself. You can find the correct carrier codes in sms_fu.yml.

deliver_sms("5558675309","AT&T","your message here")


You can set the maximum length of the SMS message, which is not set by default. Most phones can only accept 128 characters, and each phone can handle these messages differently. To set the limit, just pass it in as an option when delivering an SMS.

deliver_sms("5558675309","AT&T","your message here", :limit => 200)


If you want to roll your own mailer and just want to use SMS Fu to retrieve the formatted address of the recipient, you can do so by doing the following below.

get_sms_address("5558675309","AT&T")


Hope you all enjoy, and please send me some feedback on any new features you'd like added.