Code Monkey home page Code Monkey logo

sms-fu's Introduction

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","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. To do this just specify the limit option.

deliver_sms("5558675309","at&t","your message here", :limit => 128)
  • You can retrieve just the formatted address to use in your own mailer.

    get_sms_address("5558675309","at&t") # => "[email protected]"
    

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

sms-fu's People

Contributors

jcnetdev avatar jezdez avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.