Class: YearToDateReportMailer
- Inherits:
-
ApplicationMailer
- Object
- ActionMailer::Base
- ApplicationMailer
- YearToDateReportMailer
- Defined in:
- app/mailers/year_to_date_report_mailer.rb
Constant Summary collapse
- REPORT_TEXT =
'Year to date report'
Instance Method Summary collapse
Instance Method Details
#build(report_file) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/mailers/year_to_date_report_mailer.rb', line 7 def build(report_file) url = Reports::Uploader.get_s3_link(report_file) opt = {} opt[:to] = if FeatureFlipper.staging_email? Settings.reports.year_to_date_report.staging_emails.dup else Settings.reports.year_to_date_report.emails.dup end mail( opt.merge( subject: REPORT_TEXT, body: "#{REPORT_TEXT} (link expires in one week)<br>#{url}" ) ) end |