def notify(message, time, priority, category, host)
body = Email.format.call(self.name, arg(:from_email), arg(:from_name),
arg(:to_email), arg(:to_name), message, time,
priority, category, host)
case arg(:delivery_method)
when :smtp
notify_smtp(body)
when :sendmail
notify_sendmail(body)
end
self.info = "sent email to #{arg(:to_email)} via #{arg(:delivery_method).to_s}"
rescue Object => e
applog(nil, :info, "failed to send email to #{arg(:to_email)} via #{arg(:delivery_method).to_s}: #{e.message}")
applog(nil, :debug, e.backtrace.join("\n"))
end