brendanlim / sms-fu
- Source
- Commits
- Network (21)
- Issues (0)
- Downloads (1)
- Wiki (1)
- Graphs
-
Tree:
f933497
commit f93349785ebcc991bec1b463712d7cfef04fb91b
tree bc6b56f2343577d1da448b6642c80e233a6250c7
parent f77d6d076da2785da5c06e569c9891ba4b198c48
tree bc6b56f2343577d1da448b6642c80e233a6250c7
parent f77d6d076da2785da5c06e569c9891ba4b198c48
sms-fu / README.rdoc
| d16925d6 » | brendanlim | 2008-04-18 | 1 | = SMS Fu | |
| 2 | |||||
| 3 | Want to send an SMS from your Rails application? SMS Fu allows you to do just that. | ||||
| 4 | It allows you to send a text-message in the form of an e-mail to a cell phone on any | ||||
| 5 | of the supported carriers. | ||||
| 6 | |||||
| 7 | == Supported Carriers (US & International): | ||||
| 8 | |||||
| f17677ff » | brendanlim | 2009-02-23 | 9 | Alltel, Ameritech, AT&T, Bell Atlantic, BellSouth Mobility, Beeline(UA), BlueSkyFrog, | |
| 10 | Boost Mobile, BPL Mobile, Cellular South, Claro (Brazil, Nicaragua), Comcast, Du, | ||||
| 11 | E-Plus, Etisalat, Fido, kajeet, Mobinil, Mobitel, Movistar, Metro PCS, O2, Orange, | ||||
| 12 | Powertel, PSC Wireless, Qwest, Rogers, Southern Link, Sprint, Suncom, | ||||
| 13 | T-Mobile (US/UK/Germany), Telefonica, Tracfone, Virgin Mobile, Verizon Wireless, | ||||
| 14 | Vodafone (UK, Egypt, Italy, Japan, Spain), and many more ... | ||||
| d16925d6 » | brendanlim | 2008-04-18 | 15 | ||
| ad7cabcb » | brendanlim | 2009-07-02 | 16 | == Opt-In Warning for Some International Carriers | |
| 17 | |||||
| 18 | Some International carriers require that their users subscribe to an Email to SMS | ||||
| 19 | feature before they are able to receive SMS messages this way. If one your users | ||||
| 20 | mentions that they are not receiving their messages, chances are it is due to this | ||||
| 21 | limitation. | ||||
| 22 | |||||
| 23 | Some carriers that need this include, Mobitel, Etisalat, T-Mobile (Netherlands), | ||||
| 24 | etc. | ||||
| 25 | |||||
| d16925d6 » | brendanlim | 2008-04-18 | 26 | == Setup Instructions | |
| 27 | |||||
| 28 | Add this this one line to the controller you want to be able to use SMS Fu in. | ||||
| 29 | |||||
| 30 | class ExampleController < ApplicationController | ||||
| 8abc7168 » | brendanlim | 2009-02-18 | 31 | has_sms_fu | |
| d16925d6 » | brendanlim | 2008-04-18 | 32 | end | |
| 33 | |||||
| 34 | Modify sms_fu.yml in your config folder with your reply-to e-mail address. | ||||
| 35 | |||||
| 36 | That's it! Now you're good to go. | ||||
| 37 | |||||
| 38 | == Example Usage | ||||
| 39 | |||||
| 40 | * You have to send in the phone number, without any non-numeric characters. The | ||||
| 41 | phone numbers must be 10 digits in length. | ||||
| 42 | * The two required parameters are the phone number and the phone carrier. | ||||
| 43 | * Here are some of the default carrier values: | ||||
| 44 | |||||
| e8386f3b » | brendanlim | 2008-04-18 | 45 | Alltel Wireless => "alltel" | |
| 46 | AT&T/Cingular => "at&t" | ||||
| 47 | Boost Mobile => "boost" | ||||
| 48 | Sprint Wireless => "sprint" | ||||
| 49 | T-Mobile US => "t-mobile" | ||||
| 50 | T-Mobile UK => "t-mobile-uk" | ||||
| 51 | Virgin Mobile => "virgin" | ||||
| 52 | Verizon Wireless => "verizon" | ||||
| d23d8621 » | brendanlim | 2008-04-18 | 53 | Vodafone Tokyo => "vodafone-jp-tokyo" | |
| d16925d6 » | brendanlim | 2008-04-18 | 54 | ||
| 55 | * <b>Check sms_fu.yml for a complete list of supported carriers, including international | ||||
| 56 | carriers as well.</b> | ||||
| 3912b0b9 » | brendanlim | 2008-07-31 | 57 | ||
| 58 | deliver_sms("5558675309","at&t","message") | ||||
| 59 | |||||
| 60 | * If you want to set a custom from e-mail per SMS message, you can do so | ||||
| 61 | by doing the following. | ||||
| 62 | |||||
| 63 | deliver_sms("5558675309","at&t","message", :from => "bob@test.com") | ||||
| 64 | |||||
| d16925d6 » | brendanlim | 2008-04-18 | 65 | * You can set the maximum length of the SMS message, which is not set by | |
| 66 | default. Most phones can only accept 128 characters. To do this just | ||||
| 67 | specify the limit option. | ||||
| 3912b0b9 » | brendanlim | 2008-07-31 | 68 | ||
| 69 | deliver_sms("5558675309","at&t","message", :limit => 128) | ||||
| d16925d6 » | brendanlim | 2008-04-18 | 70 | ||
| 71 | * You can retrieve just the formatted address to use in your own mailer. | ||||
| 72 | |||||
| 73 | get_sms_address("5558675309","at&t") # => "5558675309@txt.att.net" | ||||
| 74 | |||||
| 4c1b7774 » | brendanlim | 2009-02-18 | 75 | == View Helpers | |
| 76 | |||||
| 77 | * Retrieve a collection of all carriers | ||||
| 78 | |||||
| 79 | <%= carrier_collection %> | ||||
| 80 | |||||
| 81 | * Display a select box with mobile carriers | ||||
| 82 | |||||
| 83 | <%= carrier_select %> | ||||
| 84 | |||||
| 85 | * Display a custom select box with mobile carriers | ||||
| 86 | |||||
| 87 | <%= carrier_select('user[carrier_name]', "Please choose a carrier") %> | ||||
| 3912b0b9 » | brendanlim | 2008-07-31 | 88 | ||
| d16925d6 » | brendanlim | 2008-04-18 | 89 | Copyright (c) 2008 Brendan G. Lim, Intridea, Inc., released under the MIT license | |

