improve notification feature

This commit is contained in:
olegphenomenon 2022-01-10 12:05:32 +02:00
parent 053382ffa3
commit 35f60e53e5
5 changed files with 37 additions and 16 deletions

View file

@ -5,13 +5,12 @@ module ContactNotification
domain.registrar.notifications.create(text: text)
end
def notify_tech_contact(domain:)
text = "DNSKEYS for #{domain.name} are invalid!"
def notify_tech_contact(domain:, text:)
# text = "DNSKEYS for #{domain.name} are invalid!"
domain.tech_contacts.each do |tech|
contact = Contact.find(tech.id)
ContactInformMailer.notify(contact: contact, subject: text)
ContactInformMailer.notify(contact: contact, domain: domain, subject: text).deliver_now
end
end
end