public
Description: Allows you to send an SMS in the form of an e-mail to a cell phone.
Homepage: http://intridea.com/2008/3/30/sms-fu-quickly-easily-send-text-messages
Clone URL: git://github.com/brendanlim/sms-fu.git
sms-fu /
name age message
file CHANGELOG Thu Jul 31 10:48:30 -0700 2008 Upating the CHANGELOG [brendanlim]
file MIT-LICENSE Sun Mar 30 13:10:05 -0700 2008 Initial import [brendanlim]
file README.rdoc Thu Jul 31 10:48:15 -0700 2008 Adding ability to specify custom from address p... [brendanlim]
file Rakefile Sun Mar 30 13:10:05 -0700 2008 Initial import [brendanlim]
file init.rb Sun Mar 30 13:10:05 -0700 2008 Initial import [brendanlim]
file install.rb Fri Apr 18 23:17:51 -0700 2008 Adding in kajeet to carrier list and updated RE... [brendanlim]
directory lib/ Thu Jul 31 10:48:15 -0700 2008 Adding ability to specify custom from address p... [brendanlim]
directory tasks/ Sun Mar 30 13:10:05 -0700 2008 Initial import [brendanlim]
directory templates/ Fri Apr 18 23:17:51 -0700 2008 Adding in kajeet to carrier list and updated RE... [brendanlim]
directory test/ Mon Mar 31 15:18:40 -0700 2008 Fixed some of the tests [brendanlim]
file uninstall.rb Sun Mar 30 13:10:05 -0700 2008 Initial import [brendanlim]
directory views/ Sun Mar 30 13:10:05 -0700 2008 Initial import [brendanlim]
README.rdoc

SMS Fu

Want to send an SMS from your Rails application? SMS Fu allows you to do just that. It allows you to send a text-message in the form of an e-mail to a cell phone on any of the supported carriers.

Supported Carriers (US & International):

Alltel, Ameritech, AT&T, BellSouth Mobility, BlueSkyFrog, Boost Mobile, Cellular South, E-Plus, Fido, kajeet, Metro PCS, Powertel, PSC Wireless, Qwest, Southern Link, Sprint, Suncom, T-Mobile (US/UK/Germany), Telefonica, Virgin Mobile, Verizon Wireless, Vodafone (UK,Italy,Japan, Spain)

Setup Instructions

Add this this one line to the controller you want to be able to use SMS Fu in.

    class ExampleController < ApplicationController
      include SMSFu
    end

Modify sms_fu.yml in your config folder with your reply-to e-mail address.

That’s it! Now you’re good to go.

Example Usage

  • You have to send in the phone number, without any non-numeric characters. The phone numbers must be 10 digits in length.
  • The two required parameters are the phone number and the phone carrier.
  • Here are some of the default carrier values:
      Alltel Wireless   =>  "alltel"
      AT&T/Cingular     =>  "at&t"
      Boost Mobile      =>  "boost"
      Sprint Wireless   =>  "sprint"
      T-Mobile US       =>  "t-mobile"
      T-Mobile UK       =>  "t-mobile-uk"
      Virgin Mobile     =>  "virgin"
      Verizon Wireless  =>  "verizon"
      Vodafone Tokyo    =>  "vodafone-jp-tokyo"
    
  • Check sms_fu.yml for a complete list of supported carriers, including international carriers as well.
      deliver_sms("5558675309","at&t","message")
    
  • If you want to set a custom from e-mail per SMS message, you can do so by doing the following.
      deliver_sms("5558675309","at&t","message", :from => "bob@test.com")
    
  • You can set the maximum length of the SMS message, which is not set by default. Most phones can only accept 128 characters. To do this just specify the limit option.
      deliver_sms("5558675309","at&t","message", :limit => 128)
    
  • You can retrieve just the formatted address to use in your own mailer.
      get_sms_address("5558675309","at&t") # => "5558675309@txt.att.net"
    

Copyright © 2008 Brendan G. Lim, Intridea, Inc., released under the MIT license