From 72be48b0f51515749ad7ca71190ebb942fa1d647 Mon Sep 17 00:00:00 2001 From: Brendan G. Lim Date: Sun, 29 Aug 2010 14:29:26 -0500 Subject: updating README --- README.rdoc | 31 +++++++++++++++++-------------- lib/sms_fu/sms_fu.rb | 2 +- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/README.rdoc b/README.rdoc index af046de..db0871c 100644 --- a/README.rdoc +++ b/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 diff --git a/lib/sms_fu/sms_fu.rb b/lib/sms_fu/sms_fu.rb index 3168cd1..a65f419 100644 --- a/lib/sms_fu/sms_fu.rb +++ b/lib/sms_fu/sms_fu.rb @@ -38,7 +38,7 @@ module SMSFu 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) -- cgit v1.2.3