Class: Cloudflare::EmailService::Rails::DeliveryMethod
- Inherits:
-
Object
- Object
- Cloudflare::EmailService::Rails::DeliveryMethod
- Defined in:
- lib/cloudflare/email_service/rails.rb
Overview
ActionMailer delivery method. Credentials and transport come from Cloudflare::EmailService.configure; this just maps the message and hands it to the configured transport client. Inject ‘client:` in settings to override (used in tests).
Instance Attribute Summary collapse
-
#settings ⇒ Object
readonly
Returns the value of attribute settings.
Instance Method Summary collapse
- #deliver!(mail) ⇒ Response
-
#initialize(settings = {}) ⇒ DeliveryMethod
constructor
A new instance of DeliveryMethod.
Constructor Details
#initialize(settings = {}) ⇒ DeliveryMethod
Returns a new instance of DeliveryMethod.
106 107 108 |
# File 'lib/cloudflare/email_service/rails.rb', line 106 def initialize(settings = {}) @settings = settings || {} end |
Instance Attribute Details
#settings ⇒ Object (readonly)
Returns the value of attribute settings.
104 105 106 |
# File 'lib/cloudflare/email_service/rails.rb', line 104 def settings @settings end |
Instance Method Details
#deliver!(mail) ⇒ Response
112 113 114 |
# File 'lib/cloudflare/email_service/rails.rb', line 112 def deliver!(mail) client.deliver(Message.new(**MessageMapping.call(mail))) end |