internetee-registry/app/mailers/contact_mailer.rb
Artur Beljajev 5674071838 Refactor contact mailer
- Send single email with new email in `to` and old email in `bcc` fields
- Remove `Que::Mailer` (#895)
- Add preview
- DRY templates
- Add tests
- Extract translations
- Remove useless specs
2019-04-11 17:42:59 +03:00

17 lines
No EOL
379 B
Ruby

class ContactMailer < ApplicationMailer
helper_method :address_processing
def email_changed(contact:, old_email:)
@contact = contact
@old_email = old_email
subject = default_i18n_subject(contact_code: contact.code)
mail(to: contact.email, bcc: old_email, subject: subject)
end
private
def address_processing
Contact.address_processing?
end
end