class StatusCat::Checkers::ActionMailer

Public Class Methods

new() click to toggle source
# File lib/status_cat/checkers/action_mailer.rb, line 5
def initialize
  @value = "#{address}:#{port}"
  return if ::ActionMailer::Base.delivery_method == :test
  @status = fail_on_exception { test }
end

Public Instance Methods

address() click to toggle source
# File lib/status_cat/checkers/action_mailer.rb, line 22
def address
  return config[:address]
end
authentication() click to toggle source
# File lib/status_cat/checkers/action_mailer.rb, line 26
def authentication
  return config[:authentication]
end
config() click to toggle source
# File lib/status_cat/checkers/action_mailer.rb, line 18
def config
  @config ||= ::ActionMailer::Base.smtp_settings
end
domain() click to toggle source
# File lib/status_cat/checkers/action_mailer.rb, line 30
def domain
  return config[:domain]
end
password() click to toggle source
# File lib/status_cat/checkers/action_mailer.rb, line 34
def password
  return config[:password]
end
port() click to toggle source
# File lib/status_cat/checkers/action_mailer.rb, line 38
def port
  return config[:port]
end
test() click to toggle source
# File lib/status_cat/checkers/action_mailer.rb, line 11
def test
  Net::SMTP.start(address, port, domain, user_name, password, authentication) do |smtp|
    smtp.helo(domain)
  end
  return nil
end
user_name() click to toggle source
# File lib/status_cat/checkers/action_mailer.rb, line 42
def user_name
  return config[:user_name]
end