mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 17:01:44 +02:00
added notify class and mail action for inform
This commit is contained in:
parent
b25ef62d78
commit
ca9ca115eb
5 changed files with 54 additions and 1 deletions
17
app/services/contact_notification.rb
Normal file
17
app/services/contact_notification.rb
Normal file
|
@ -0,0 +1,17 @@
|
|||
module ContactNotification
|
||||
extend self
|
||||
|
||||
def notify_registrar(domain:, text:)
|
||||
domain.registrar.notifications.create(text: text)
|
||||
end
|
||||
|
||||
def notify_tech_contact(domain:)
|
||||
text = "DNSKEYS for #{domain.name} are invalid!"
|
||||
domain.tech_domain_contacts.each do |tech|
|
||||
contact = Contact.find(tech.id)
|
||||
|
||||
ContactInformMailer.notify(contact: contact, subject: text)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue