Class: SmsOnRails::ServiceProviders::EmailGateway
- Defined in:
- lib/sms_on_rails/service_providers/email_gateway.rb
Class Method Summary collapse
-
.mailer_klass ⇒ Object
The mailer class to use that can be specified in the config options for :mailer_klass.
Instance Method Summary collapse
- #mailer_klass ⇒ Object
- #ping ⇒ Object
- #requires_carrier? ⇒ Boolean
-
#send_message(phone_text, message, options = {}) ⇒ Object
Email Gateway Send message.
Methods inherited from Base
#deliver, get_service_provider, human_name, max_characters, name, provider_by_id, provider_by_name, provider_list, provider_map, #send_sms, #send_to_phone, set_default_service_provider
Class Method Details
.mailer_klass ⇒ Object
The mailer class to use that can be specified in the config options for :mailer_klass
61 62 63 |
# File 'lib/sms_on_rails/service_providers/email_gateway.rb', line 61 def mailer_klass#:nodoc: @mailer_klass ||= config[:mailer_klass]||SmsOnRails::ServiceProviders::EmailGatewaySupport::SmsMailer end |
Instance Method Details
#mailer_klass ⇒ Object
11 |
# File 'lib/sms_on_rails/service_providers/email_gateway.rb', line 11 def mailer_klass; self.class.mailer_klass; end |
#ping ⇒ Object
9 |
# File 'lib/sms_on_rails/service_providers/email_gateway.rb', line 9 def ping; true; end |
#requires_carrier? ⇒ Boolean
13 |
# File 'lib/sms_on_rails/service_providers/email_gateway.rb', line 13 def requires_carrier?; true; end |
#send_message(phone_text, message, options = {}) ⇒ Object
Email Gateway Send message
('[email protected]', 'My message')
('12065551234', 'my message', :carrier => 'Verizon')
(['12065551234', '4125556667'], 'my message', :carrier => 'Verizon')
Params
-
phone_number
- can be one of the followingsms_email_address. Example: '[email protected]' array of sms_email_addresses: ['[email protected]', '[email protected]']
-
message
- the text message to send
Options
-
:sender
- email address of the sender overrides default -
:bcc
- email_address or array of email_addresses to blind carbon copy
30 31 32 33 |
# File 'lib/sms_on_rails/service_providers/email_gateway.rb', line 30 def (phone_text, , ={}) mailer_klass.deliver_sms_through_gateway(phone_text, , self.class.config.merge()) {} end |