Class: Ixtlan::Errors::Mailer

Inherits:
ActionMailer::Base
  • Object
show all
Defined in:
lib/ixtlan/errors/mailer.rb,
lib/ixtlan/errors/mailer.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.error_notification(email_from, emails_to, exception, error_url) ⇒ Object



38
39
40
41
42
43
44
45
# File 'lib/ixtlan/errors/mailer.rb', line 38

def self.error_notification(email_from, emails_to, exception, error_url)
  Deliver.new do
    Pony.mail( :from => email_from,
               :to => emails_to,
               :subject => exception.message,
               :body => "#{error_url}" )
  end
end

Instance Method Details

#error_notification(email_from, emails_to, exception, error_url) ⇒ Object



51
52
53
54
55
56
57
58
# File 'lib/ixtlan/errors/mailer.rb', line 51

def error_notification(email_from, emails_to, exception, error_url)
  @subject    = exception.message
  @text       = "#{error_url}"
  @recipients = emails_to
  @from       = email_from
  @sent_on    = Time.now
  @headers    = {}
end