Class: Tocsin::Notifiers::EmailNotifier

Inherits:
Object
  • Object
show all
Defined in:
lib/tocsin/notifiers/email_notifier.rb

Class Method Summary collapse

Class Method Details

.notify(recipients, alert) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/tocsin/notifiers/email_notifier.rb', line 6

def self.notify(recipients, alert)
  attrs = { :from     => sender(recipients),
            :to       => recipients,
            :subject  => subject(alert),
            :body     => compose(alert) }

  message = mail(attrs)
  message.deliver
end