Class: Cerberus::Publisher::Mail::ActionMailerPublisher

Inherits:
ActionMailer::Base
  • Object
show all
Defined in:
lib/cerberus/publisher/mail.rb

Instance Method Summary collapse

Instance Method Details

#message(state, manager, options) ⇒ Object



31
32
33
34
35
36
# File 'lib/cerberus/publisher/mail.rb', line 31

def message(state, manager, options)
  @subject, @body = Cerberus::Publisher::Base.formatted_message(state, manager, options)
  @recipients, @sent_on = options[:publisher, :mail, :recipients], Time.now
  @from = options[:publisher, :mail, :sender] || '[email protected]' 
  raise "Please specify recipient addresses for application '#{options[:application_name]}'" unless @recipients
end