Sha256: 6a7b0c06a804b5b8521cc209dbdf9218e6157adf30dc12f40c28d2ba90fe09f9

Contents?: true

Size: 797 Bytes

Versions: 9

Compression:

Stored size: 797 Bytes

Contents

module Caboose
  class CabooseMailer < ActionMailer::Base
    include AbstractController::Callbacks
    
    default :from => Caboose::email_from
    
    cattr_accessor :site
    @@site = nil
    
    before_filter do |mailer|
      config = SmtpConfig.where(:site_id => @@site.id).first    
      self.smtp_settings['user_name']            = config.user_name
      self.smtp_settings['password']             = config.password
      self.smtp_settings['address']              = config.address
      self.smtp_settings['port']                 = config.port
      self.smtp_settings['domain']               = config.domain
      self.smtp_settings['authentication']       = config.authentication
      self.smtp_settings['enable_starttls_auto'] = config.enable_starttls_auto
    end
    
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
caboose-cms-0.6.18 app/mailers/caboose/caboose_mailer.rb
caboose-cms-0.6.17 app/mailers/caboose/caboose_mailer.rb
caboose-cms-0.6.16 app/mailers/caboose/caboose_mailer.rb
caboose-cms-0.6.15 app/mailers/caboose/caboose_mailer.rb
caboose-cms-0.6.14 app/mailers/caboose/caboose_mailer.rb
caboose-cms-0.6.13 app/mailers/caboose/caboose_mailer.rb
caboose-cms-0.6.12 app/mailers/caboose/caboose_mailer.rb
caboose-cms-0.6.11 app/mailers/caboose/caboose_mailer.rb
caboose-cms-0.6.10 app/mailers/caboose/caboose_mailer.rb