Module: CoreSmtpConfiguration::SmtpClassMethods

Defined in:
lib/app/models/concerns/core_smtp_configuration.rb

Overview

Class methods for smtp configuration

Instance Method Summary collapse

Instance Method Details

#smtp_configurationObject



33
34
35
36
37
38
39
40
41
42
# File 'lib/app/models/concerns/core_smtp_configuration.rb', line 33

def smtp_configuration
  output = {}
  config = configuration
  fields = %w[name address domain port user_name password enable_starttls_auto]
  fields.each do |field|
    field_name = "smtp_#{field}".to_sym
    output[field.to_sym] = config.send(field_name)
  end
  output
end