Skip to content
프로젝트

소개

Allows you to send an SMS using Ruby for FREE using an email to sms solution.

생산성 및 자동화

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
-1
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Want to send an SMS from your Ruby 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 many supported carriers.

Alltel, Ameritech, AT&T, Bell Atlantic, BellSouth Mobility, Beeline(UA), BlueSkyFrog, Boost Mobile, BPL Mobile, Cellular South, Claro (Brazil, Nicaragua), Comcast, Du, E-Plus, Etisalat, Fido, kajeet, Mobinil, Mobitel, Movistar, Metro PCS, O2, Orange, Powertel, PSC Wireless, Qwest, Rogers, Southern Link, Sprint, Suncom, T-Mobile (US/UK/Germany), Telefonica, Tracfone, Virgin Mobile, Verizon Wireless, Vodafone (UK, Egypt, Italy, Japan, Spain), and many more …

Some International carriers require that their users subscribe to an Email to SMS feature before they are able to receive SMS messages this way. If one your users mentions that they are not receiving their messages, chances are it is due to this limitation. Some of these carriers are include, Mobitel, Etisalat, T-Mobile (Netherlands).

  • SMS Fu requires that ‘action_mailer’ (>= 3.0.0rc2) and ‘pony’ (>= 1.0) are installed.

  • If you require SMS Fu on an older version of ActionMailer, make sure to use the older plugin version of SMS Fu at github.com/brendanlim/sms-fu/tree/plugin

  • 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.

  • SMS Fu relies on either ActionMailer or Pony for delivery. You can now specify which you’d like to use for delivery.

  • You can use your ActionMailer settings by just specifying the :delivery option as :action_mailer.

  • If you would like to use Pony, you can configure it to use :sendmail or :smtp via Pony. Set the :delivery option to :pony and then make sure to include :pony_config as well

    # ActionMailer delivery
    sms_fu = SMSFu::Client.configure(:delivery => :action_mailer)
    
    # Pony delivery via Sendmail
    sms_fu = SMSFu::Client.configure(:delivery => :pony, :pony_config => { :via => :sendmail })
    
    # Pony delivery via SMTP
    PONY_CONFIG = { 
      :via => :smtp, 
      :via_options => {
        :address              => 'smtp.gmail.com',
        :port                 => '587',
        :user_name            => 'username',
        :password             => 'password',
        :authentication       => :plain, 
        :enable_starttls_auto => true,
        :domain               => "localhost.localdomain"
    }}
    
    sms_fu = SMSFu::Client.configure(:delivery => :pony, :pony_config => PONY_CONFIG)
    
  • You can view more pony ‘via_options’ at github.com/benprew/pony

  • Basic SMS delivery

    sms_fu.deliver("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.

    sms_fu.deliver("5558675309","at&t","message", :from => "[email protected]")
    
  • 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.

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

    SMSFu.sms_address("5558675309","at&t") # => "[email protected]"
    
  • Retrieve a collection of all carriers

    <%= carrier_collection %>
  • Display a select box with mobile carriers

    <%= carrier_select %>
  • Display a custom select box with mobile carriers

    <%= carrier_select('user[carrier_name]', "Please choose a carrier") %>

I want to thank the following individuals with their help with adding some patches to SMS Fu:

  • Brent Collier (brentmc79)

  • Peter Boling (pboling)

  • Mike (mic)

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

관련 프로젝트 살펴보기

불러오는 중…