Sha256: 4267df5963ebc9dbe6b675809080f2570b41c0bd6891a03a4f6c4561493be2b4

Contents?: true

Size: 888 Bytes

Versions: 6

Compression:

Stored size: 888 Bytes

Contents

module Cloudfuji
  class SMTP
    class << self
      [:tls, :server, :port, :domain, :authentication, :user, :password].each do |method_name|
        define_method "#{method_name}".to_sym do
          ENV["SMTP_#{method_name.to_s.upcase}"]
        end
      end

      def setup_action_mailer_smtp!
        require "action_mailer"

        ActionMailer::Base.smtp_settings = {
          :enable_starttls_auto => Cloudfuji::SMTP.tls,
          :tls =>                  Cloudfuji::SMTP.tls,
          :address =>              Cloudfuji::SMTP.server,
          :port =>                 Cloudfuji::SMTP.port,
          :domain =>               Cloudfuji::SMTP.domain,
          :authentication =>       Cloudfuji::SMTP.authentication,
          :user_name =>            Cloudfuji::SMTP.user,
          :password =>             Cloudfuji::SMTP.password,
        }
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cloudfuji-0.0.46 lib/cloudfuji/smtp.rb
cloudfuji-0.0.45 lib/cloudfuji/smtp.rb
cloudfuji-0.0.44 lib/cloudfuji/smtp.rb
cloudfuji-0.0.43 lib/cloudfuji/smtp.rb
cloudfuji-0.0.42 lib/cloudfuji/smtp.rb
cloudfuji-0.0.41 lib/cloudfuji/smtp.rb