summaryrefslogtreecommitdiffstats
path: root/README.rdoc
diff options
context:
space:
mode:
Diffstat (limited to 'README.rdoc')
-rw-r--r--README.rdoc59
1 files changed, 47 insertions, 12 deletions
diff --git a/README.rdoc b/README.rdoc
index 0d1b92a..db4e958 100644
--- a/README.rdoc
+++ b/README.rdoc
@@ -25,20 +25,20 @@ etc.
== Setup Instructions
-Install sms_fu gem
+* Install sms_fu gem
sudo gem install sms_fu
-Add sms_fu.yml to your config folder (Rails only)
+* Make sure you have the 'action_mailer' (>= 3.0.0rc2) or 'pony' (>= 1.0) gem installed.
- http://github.com/brendanlim/sms-fu/blob/master/templates/sms_fu.yml
+* Add sms_fu.yml to your config folder (Rails only)
-Modify sms_fu.yml in your config folder with your reply-to e-mail address.
+ http://github.com/brendanlim/sms-fu/blob/master/templates/sms_fu.yml
-That's it! Now you're good to go.
+* (Optional) Modify sms_fu.yml in your config folder with your reply-to e-mail address.
== 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.
@@ -54,25 +54,60 @@ That's it! Now you're good to go.
Verizon Wireless => "verizon"
Vodafone Tokyo => "vodafone-jp-tokyo"
-* <b>Check sms_fu.yml for a complete list of supported carriers, including international
- carriers as well.</b>
+* Check sms_fu.yml for a complete list of supported carriers, including international
+ carriers as well.
+
+* Configure and setup SMS Fu
+
+SMS Fu relies on either ActionMailer or Pony for delivery. You can now specify
+which you'd like to use for delivery.
- SMSFu.deliver("5558675309","at&t","message")
+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 specify the
+:pony_options as well, if necessary.
+
+ sms_fu = SMSFu.configure(:delivery => :action_mailer)
+
+ -- or --
+
+ sms_fu = SMSFu.configure(:delivery => :pony, :pony_options => { :via => :sendmail })
+
+ -- or --
+
+ sms_fu = SMSFu.configure(:delivery => :pony,
+ :pony_options => {
+ :via => :smtp,
+ :via_options => {
+ :address => 'smtp.gmail.com',
+ :port => '587',
+ :user_name => 'username',
+ :password => 'password',
+ :authentication => :plain,
+ :domain => "localhost.localdomain"
+ :enable_starttls_auto => true,
+ }})
+
+You can view more pony 'via_options' at http://github.com/benprew/pony
+
+ 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.
- SMSFu.deliver("5558675309","at&t","message", :from => "bob@test.com")
+ sms_fu.deliver("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.
- SMSFu.deliver("5558675309","at&t","message", :limit => 128)
+ 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") # => "5558675309@txt.att.net"
+ sms_fu.sms_address("5558675309","at&t") # => "5558675309@txt.att.net"
== View Helpers (Rails)