Sha256: f9a5ee16cbffb0eed62a6cf6ed40181d6a31b53dc241633ce683811e9c958559

Contents?: true

Size: 840 Bytes

Versions: 62

Compression:

Stored size: 840 Bytes

Contents

module Workarea
  module Configuration
    module ActionMailer
      extend self

      def load
        Rails.application.config.action_mailer.asset_host = Rails.application.config.action_controller.asset_host
        Rails.application.config.action_mailer.show_previews = !Rails.env.production?

        unless Rails.env.test? || Rails.env.development?
          if Rails.application.secrets.smtp_settings.present?
            Rails.application.config.action_mailer.raise_delivery_errors = true
            Rails.application.config.action_mailer.delivery_method = :smtp
            Rails.application.config.action_mailer.smtp_settings = smtp_settings
          end
        end
      end

      def smtp_settings
        Rails.application.secrets.smtp_settings.merge(enable_starttls_auto: false).symbolize_keys
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.5.27 lib/workarea/configuration/action_mailer.rb
workarea-core-3.5.26 lib/workarea/configuration/action_mailer.rb
workarea-core-3.4.45 lib/workarea/configuration/action_mailer.rb
workarea-core-3.5.25 lib/workarea/configuration/action_mailer.rb
workarea-core-3.5.23 lib/workarea/configuration/action_mailer.rb
workarea-core-3.4.44 lib/workarea/configuration/action_mailer.rb
workarea-core-3.5.22 lib/workarea/configuration/action_mailer.rb
workarea-core-3.4.43 lib/workarea/configuration/action_mailer.rb
workarea-core-3.5.21 lib/workarea/configuration/action_mailer.rb
workarea-core-3.4.42 lib/workarea/configuration/action_mailer.rb
workarea-core-3.5.20 lib/workarea/configuration/action_mailer.rb
workarea-core-3.4.41 lib/workarea/configuration/action_mailer.rb
workarea-core-3.5.19 lib/workarea/configuration/action_mailer.rb
workarea-core-3.4.40 lib/workarea/configuration/action_mailer.rb
workarea-core-3.5.18 lib/workarea/configuration/action_mailer.rb
workarea-core-3.4.39 lib/workarea/configuration/action_mailer.rb
workarea-core-3.5.17 lib/workarea/configuration/action_mailer.rb
workarea-core-3.4.38 lib/workarea/configuration/action_mailer.rb
workarea-core-3.5.16 lib/workarea/configuration/action_mailer.rb
workarea-core-3.4.37 lib/workarea/configuration/action_mailer.rb