Class: Ayl::Mailer

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/ayl/mailer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#mailerObject

Returns the value of attribute mailer.



6
7
8
# File 'lib/ayl/mailer.rb', line 6

def mailer
  @mailer
end

Instance Method Details

#deliver_message(message, exception = nil) ⇒ Object



13
14
15
16
17
# File 'lib/ayl/mailer.rb', line 13

def deliver_message(message, exception=nil)
  mailer.ayl_message(message, exception).deliver if mailer && mailer.respond_to?(:ayl_message)
rescue Exception => ex
  Ayl::Logger.instance.error("Error sending ayl email message: #{ex.backtrace.join("\n")}")
end