class OkComputer::ActionMailerCheck
Verifies if the mail server configured for ActionMailer is responding.
Attributes
Public Class Methods
Source
# File lib/ok_computer/built_in_checks/action_mailer_check.rb, line 7 def initialize(klass = ActionMailer::Base, timeout = 5) self.klass = klass self.timeout = timeout host = klass.smtp_settings[:address] port = klass.smtp_settings[:port] || 25 super(host, port, timeout) end
Calls superclass method
Public Instance Methods
Source
# File lib/ok_computer/built_in_checks/action_mailer_check.rb, line 16 def check tcp_socket_request mark_message "#{klass} check to #{host}:#{port} successful" rescue => e mark_message "#{klass} at #{host}:#{port} is not accepting connections: '#{e}'" mark_failure end
Public: Return the status of the check