Class: ReportMailer

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

Instance Method Summary collapse

Instance Method Details

#email_report(to_email, cc_email, file_attachments, subject, message, dba_organization = nil) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'app/mailers/report_mailer.rb', line 4

def email_report(to_email, cc_email, file_attachments, subject, message, dba_organization=nil)
  @message = message
  @subject = subject

  file_attachments.each do |file_attachment|
    attachments[file_attachment[:name]] = file_attachment[:data]
  end

  mail(:to => to_email, :subject => subject, :cc => cc_email)
end