mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 21:54:48 +02:00
- 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
17 lines
No EOL
379 B
Ruby
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 |