Module: ContainerConfig::Rails::Mailer
- Defined in:
- lib/container_config/rails/mailer.rb
Overview
Rails ActionMailer config module
Class Method Summary collapse
-
.load(key, **options) ⇒ Hash
loads Rails ActionMailer configuration settings from environment variables, mounted secrets, or the application credentials.
Class Method Details
.load(key, **options) ⇒ Hash
loads Rails ActionMailer configuration settings from environment variables, mounted secrets, or the application credentials
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/container_config/rails/mailer.rb', line 20 def self.load(key, **) mail_config = {} mail_config[:perform_deliveries] = ContainerConfig.load("#{key}_PERFORM_DELIVERIES", default: ::Rails.env.production?, type: :boolean) mail_config[:perform_caching] = ContainerConfig.load("#{key}_PERFORM_CACHING", default: false, type: :boolean) mail_config[:raise_delivery_errors] = ContainerConfig.load("#{key}_RAISE_DELIVERY_ERRORS", default: false, type: :boolean) mail_config[:delivery_method] = ContainerConfig.load("#{key}_DELIVERY_METHOD", default: :sendmail, type: :symbol, enum: %i[smtp sendmail]) mail_config[:sendmail_settings] = mailer_sendmail_settings(key, **) mail_config[:smtp_settings] = mailer_smtp_settings(key, **) mail_config.compact end |