Sha256: 1aba899dc8308d6338ae248aa8dad36e271a05abf0fc9c26199dc981989dab9e

Contents?: true

Size: 653 Bytes

Versions: 3

Compression:

Stored size: 653 Bytes

Contents

# ApplicationMailer
class ApplicationMailer < ActionMailer
  default from: 'testing@keppler.com'
  layout 'mailers/mailer'

  after_filter :set_smtp

  def testing
    mail to: 'example@keppler.com', subject: 'Keppler email'
  end

  private

  def set_smtp
    setting = Setting.first.smtp_setting
    unless setting.address == 'test'
      mail.delivery_method.settings.merge!(
        address: setting.address,
        port: setting.port,
        domain: setting.domain_name,
        user_name: setting.email,
        password: setting.password
      )

      ApplicationMailer.default_url_options.merge!(host: setting.domain_name)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
keppler-2.0.2 installer/core/app/mailers/application_mailer.rb
keppler-2.0.1 installer/core/app/mailers/application_mailer.rb
keppler-2.0.0 installer/core/app/mailers/application_mailer.rb