Class: BrevoRails::ActionMailer::DeliveryMethod

Inherits:
Object
  • Object
show all
Defined in:
lib/brevo_rails/action_mailer/delivery_method.rb

Constant Summary collapse

ALLOWED_PARAMS =
%i[api_key].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(settings) ⇒ DeliveryMethod

Returns a new instance of DeliveryMethod.



10
11
12
# File 'lib/brevo_rails/action_mailer/delivery_method.rb', line 10

def initialize(settings)
  self.settings = settings
end

Instance Attribute Details

#settingsObject

Returns the value of attribute settings.



6
7
8
# File 'lib/brevo_rails/action_mailer/delivery_method.rb', line 6

def settings
  @settings
end

Instance Method Details

#deliver!(message) ⇒ Object



14
15
16
17
18
# File 'lib/brevo_rails/action_mailer/delivery_method.rb', line 14

def deliver!(message)
  mail = BrevoRails::Mail.from_message(message)

  api.send_transac_email(mail)
end