Sha256: 75f9b760f6133eec0317ac4a6b35c072b4964810567e101131eaaa1084a3588c

Contents?: true

Size: 678 Bytes

Versions: 21

Compression:

Stored size: 678 Bytes

Contents

# frozen_string_literal: true

module NeetoCommonsBackend
  class ApplicationMailer < ActionMailer::Base
    layout "layouts/common"

    default from: -> { get_from_email(Rails.application.secrets.mailer[:default_from_email]) },
      bcc: Rails.application.secrets.mailer[:default_bcc_email],
      reply_to: Rails.application.secrets.mailer[:default_from_email]

    default_url_options[:host] = Rails.application.secrets.host

    default template_path: -> { "mailers/#{self.class.name.underscore}" }

    private

      def get_from_email(from_email)
        name = Rails.application.secrets.mailer[:default_from_name]
        "#{name} <#{from_email}>"
      end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
neeto-commons-backend-1.0.109 app/mailers/neeto_commons_backend/application_mailer.rb
neeto-commons-backend-1.0.108 app/mailers/neeto_commons_backend/application_mailer.rb
neeto-commons-backend-1.0.107 app/mailers/neeto_commons_backend/application_mailer.rb
neeto-commons-backend-1.0.106 app/mailers/neeto_commons_backend/application_mailer.rb
neeto-commons-backend-1.0.105 app/mailers/neeto_commons_backend/application_mailer.rb
neeto-commons-backend-1.0.104 app/mailers/neeto_commons_backend/application_mailer.rb
neeto-commons-backend-1.0.103 app/mailers/neeto_commons_backend/application_mailer.rb
neeto-commons-backend-1.0.102 app/mailers/neeto_commons_backend/application_mailer.rb
neeto-commons-backend-1.0.101 app/mailers/neeto_commons_backend/application_mailer.rb
neeto-commons-backend-1.0.100 app/mailers/neeto_commons_backend/application_mailer.rb
neeto-commons-backend-1.0.99 app/mailers/neeto_commons_backend/application_mailer.rb
neeto-commons-backend-1.0.98 app/mailers/neeto_commons_backend/application_mailer.rb
neeto-commons-backend-1.0.97 app/mailers/neeto_commons_backend/application_mailer.rb
neeto-commons-backend-1.0.96 app/mailers/neeto_commons_backend/application_mailer.rb
neeto-commons-backend-1.0.95 app/mailers/neeto_commons_backend/application_mailer.rb
neeto-commons-backend-1.0.94 app/mailers/neeto_commons_backend/application_mailer.rb
neeto-commons-backend-1.0.93 app/mailers/neeto_commons_backend/application_mailer.rb
neeto-commons-backend-1.0.92 app/mailers/neeto_commons_backend/application_mailer.rb
neeto-commons-backend-1.0.91 app/mailers/neeto_commons_backend/application_mailer.rb
neeto-commons-backend-1.0.90 app/mailers/neeto_commons_backend/application_mailer.rb