Class: IsItWorking::ActionMailerCheck
- Defined in:
- lib/is_it_working/checks/action_mailer_check.rb
Overview
Check if the mail server configured for ActionMailer is responding.
The ActionMailer class that yields the configuration can be specified with the :class
option. By default this will be ActionMailer::Base. You can also set a :timeout
option for how long to wait for a response and an :alias
option which will be the name reported back by the check (defaults to the ActionMailer class).
Example
IsItWorking::Handler.new do |h|
h.check :action_mailer, :class => UserMailer
end
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ ActionMailerCheck
constructor
A new instance of ActionMailerCheck.
Methods inherited from PingCheck
Constructor Details
#initialize(options = {}) ⇒ ActionMailerCheck
Returns a new instance of ActionMailerCheck.
17 18 19 20 21 22 23 |
# File 'lib/is_it_working/checks/action_mailer_check.rb', line 17 def initialize(={}) = .dup klass = .delete(:class) || ActionMailer::Base .merge!(:host => klass.smtp_settings[:address], :port => klass.smtp_settings[:port] || 'smtp') [:alias] ||= klass.name super() end |