if failed? && !exception.is_a?(SystemExit)
subject = "Chef run failed on #{node.name}"
message = "#{run_status.formatted_exception}\n"
- elsif elapsed_time > 300
+ elsif elapsed_time > 600
subject = "Chef run took #{elapsed_time} on #{node.name}"
message = ""
end
message << Array(backtrace).join("\n")
- require "pony"
+ require "mail"
- Pony.mail(:to => @config[:to], :from => @config[:from],
- :subject => subject, :body => message, :via => :smtp)
+ Mail.deliver do
+ to @config[:to]
+ from @config[:from]
+ subject subject
+ body message
+ end
end
end
end