Browse files

updating README

  • Loading branch information...
1 parent a32865a commit 72be48b0f51515749ad7ca71190ebb942fa1d647 @brendanlim committed Aug 29, 2010
Showing with 18 additions and 15 deletions.
  1. +17 −14 README.rdoc
  2. +1 −1 lib/sms_fu/sms_fu.rb
View
31 README.rdoc
@@ -70,26 +70,29 @@ etc.
: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.
+ Pony. Set the :delivery option to :pony and then make sure to include :pony_config
+ as well
# ActionMailer delivery
- sms_fu = SMSFu.configure(:action_mailer)
+ sms_fu = SMSFu::Client.configure(:delivery => :action_mailer)
# Pony delivery via Sendmail
- sms_fu = SMSFu.configure(:pony, :pony_options => { :via => :sendmail })
+ sms_fu = SMSFu::Client.configure(:delivery => :pony, :pony_config => { :via => :sendmail })
# Pony delivery via SMTP
- sms_fu = SMSFu.configure(: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,
- }})
+ 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 http://github.com/benprew/pony
View
2 lib/sms_fu/sms_fu.rb
@@ -38,7 +38,7 @@ def deliver(number, carrier, message, options = {})
raise SMSFuException.new("Can't deliver blank message to #{format_number(number)}") if message.nil? || message.empty?
limit = options[:limit] || message.length
- from = options[:from] || from_address
+ from = options[:from] || SMSFu.from_address
message = message[0..limit-1]
email = SMSFu.sms_address(number,carrier)

0 comments on commit 72be48b

Please sign in to comment.