Class: MeExceptional::Mailer

Inherits:
ActionMailer::Base
  • Object
show all
Defined in:
app/mailers/me_exceptional/mailer.rb

Instance Method Summary collapse

Instance Method Details

#error_mail(message, params) ⇒ Object



12
13
14
15
16
# File 'app/mailers/me_exceptional/mailer.rb', line 12

def error_mail(message, params)
  @message, @params = message, params
  subject = "[EXCEPTION] #{message}"
  mail(:from => MeExceptional.mailer_from, :to => MeExceptional.mailer_to, :subject => subject)
end

#exceptional(message, params) ⇒ Object



5
6
7
8
9
10
# File 'app/mailers/me_exceptional/mailer.rb', line 5

def exceptional(message, params)
  @message, @params = message, params
  @hostname = get_hostname(params[:client_ip])
  @loc = geocode_ip(params[:client_ip])[0]
  mail(:from => MeExceptional.mailer_from, :to => MeExceptional.mailer_to, :subject => message)
end