Class: Ketchup::Exception::Mailer

Inherits:
ActionMailer::Base
  • Object
show all
Defined in:
lib/rails/mailer.rb

Instance Method Summary collapse

Instance Method Details

#notification_email(err, host) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/rails/mailer.rb', line 7

def notification_email(err,host)
  @message = err.message
  @host = host
  if err.backtrace.respond_to?(:join)
    @backtrace = err.backtrace.join("\n").gsub("\r","")
  else
    @backtrace = err.backtrace
  end
  recipients = Ketchup::Exception.recipients  
  mail(:to => recipients,:subject => Ketchup::Exception.subject,
       :template_path => Ketchup::Exception.template_path,
       :template_name => Ketchup::Exception.template_name,
       :from => Ketchup::Exception.sender)
end