Commit 7a6fd74e authored by Andi Saurer's avatar Andi Saurer

default sms sender

parent 2e502869
......@@ -10,7 +10,9 @@ module ShortMessage
end
def deliver
unless self.sender.blank? and self.recipient.blank? and self.text.blank?
self.sender = ShortMessage.config.default_sms_sender if self.sender.blank?
unless self.recipient.blank? and self.text.blank?
http = Net::HTTP.new(ShortMessage.config.gateway_server)
response, data = http.post(ShortMessage.config.send_file_path, build_deliver_params_string)
......
......@@ -15,4 +15,7 @@ ShortMessage.configure do |config|
config.default_mail_sender = "webmaster@your-domain.com"
config.reload_notification_email = "webmaster@your-domain.com"
config.voucher_notification_email = "give-me-money@your-domain.com" # set nil to disable voucher mailing
# set a default sms sender (used if no sender is present)
# config.default_sms_sender = ""
end
\ No newline at end of file
......@@ -20,6 +20,7 @@ module ShortMessage
config_accessor :ccu_id
config_accessor :id_string
config_accessor :default_sms_sender
config_accessor :default_reload_amount
config_accessor :reload_notification_email
config_accessor :voucher_notification_email
......
module ShortMessage
VERSION = "0.0.2"
VERSION = "0.0.3"
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment