Class: Deliveryman::Mailer

Inherits:
ActionMailer::Base
  • Object
show all
Defined in:
lib/deliveryman/mailer.rb

Instance Method Summary collapse

Instance Method Details

#monthlyObject



7
8
9
10
11
12
13
# File 'lib/deliveryman/mailer.rb', line 7

def monthly
  @data = Deliveryman.configuration.processor.call
  app_name = defined?(Rails) ? "[#{Rails.application.class.parent_name}]" : ""
  mail to: Deliveryman.configuration.report_mail_to, from: Deliveryman.configuration.report_mail_from, subject: "#{app_name}Monthly report mail" do |format|
    format.text
  end
end