parent 64e3bc885a2cb8b46a1aaa4bf4f121ee7f5d44a6

author Karl Erik Õunapuu <karlerik@kreative.ee> 1591359032 +0300
committer Alex Sherman <yul.golem@gmail.com> 1617029320 +0500

CsyncJob: Don't respect IPv6 if nessecary
This commit is contained in:
Karl Erik Õunapuu 2020-06-05 15:10:32 +03:00 committed by Alex Sherman
parent e46fdd57af
commit 88e1bc3727
33 changed files with 1475 additions and 119 deletions

View file

@ -0,0 +1,23 @@
class CsyncMailer < ApplicationMailer
def dnssec_updated(domain:)
@domain = domain
emails = contact_emails(domain)
subject = default_i18n_subject(domain_name: domain.name)
mail(to: emails, subject: subject)
end
def dnssec_deleted(domain:)
@domain = domain
emails = contact_emails(domain)
subject = default_i18n_subject(domain_name: domain.name)
mail(to: emails, subject: subject)
end
private
def contact_emails(domain)
(domain.contacts.map(&:email) << domain.registrant.email).uniq
end
end