Class: Rad::Mailer

Inherits:
Object show all
Defined in:
lib/rad/mailer/_mailer.rb

Defined Under Namespace

Modules: MailerController Classes: Letter

Instance Method Summary collapse

Instance Method Details

#deliver(letter) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/rad/mailer/_mailer.rb', line 4

def deliver letter
  mail = Mail.new letter.to_h
  if rad.development?
    logger.info "RAD delivering mail #{letter.to_h.inspect}"
  else
    logger.info "RAD delivering mail '#{letter.subject}'"
  end
  mail.deliver!
end