Class: Konfig::SmtpAdapter

Inherits:
Adapter
  • Object
show all
Defined in:
lib/konfig/rails/adapters/smtp_adapter.rb

Instance Method Summary collapse

Methods inherited from Adapter

children, clear_children, create_and_send_to_children, inherited, send_to_children

Instance Method Details

#adapt(data) ⇒ Object



3
4
5
6
7
8
9
10
11
12
# File 'lib/konfig/rails/adapters/smtp_adapter.rb', line 3

def adapt(data)
  begin
    c = data[:_smtp][Rails.env]
    ActionMailer::Base.smtp_settings = c.symbolize_keys

    c = data[:_smtp][:_adapted] = true
    Rails.logger.info "[Konfig] Loaded SMTP setting"
  rescue
  end
end