Class: PaymentReminderMailer

Inherits:
DmCore::SiteMailer
  • Object
show all
Defined in:
app/mailers/payment_reminder_mailer.rb

Instance Method Summary collapse

Instance Method Details

#payment_reminder(registration) ⇒ Object




10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'app/mailers/payment_reminder_mailer.rb', line 10

def payment_reminder(registration)
                       = registration.
  @subject                    = I18n.t('ems.ticket_payment_reminder_subject', value: registration.workshop.title)
  @recipients                 = registration.email
  @registration               = registration
  @payment_owed               = registration.payment_owed.format
  @payment_link               = registration.payment_url

  headers = { "Reply-To" => .preferred_smtp_from_email, "Return-Path" => .preferred_smtp_from_email }
  mail(to: @recipients, subject: @subject, theme: .,
       bcc: .preferred_archive_email,
       template_path: 'layouts/email_templates',
       template_name: 'dm_event_payment_reminder')
end