mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 02:35:57 +02:00
Added domain delete rejection notification #2786
This commit is contained in:
parent
8a92591df7
commit
acb9f2ee08
6 changed files with 79 additions and 0 deletions
|
@ -8,6 +8,7 @@ class DomainDeleteConfirmJob < Que::Job
|
|||
domain.apply_pending_delete!
|
||||
domain.clean_pendings!
|
||||
when RegistrantVerification::REJECTED
|
||||
DomainMailer.pending_delete_rejected_notification(domain).deliver_now
|
||||
domain.clean_pendings!
|
||||
end
|
||||
destroy # it's best to destroy the job in the same transaction
|
||||
|
|
|
@ -123,4 +123,24 @@ class DomainMailer < ApplicationMailer
|
|||
subject: "#{I18n.t(:domain_pending_deleted_subject,
|
||||
name: @domain.name)} [#{@domain.name}]")
|
||||
end
|
||||
|
||||
def pending_delete_rejected_notification(domain)
|
||||
@domain = domain
|
||||
# no delivery off control, driggered by que, no epp request
|
||||
|
||||
if @domain.registrant_verification_token.blank?
|
||||
logger.warn "EMAIL NOT DELIVERED: registrant_verification_token is missing for #{@domain.name}"
|
||||
return
|
||||
end
|
||||
|
||||
if @domain.registrant_verification_asked_at.blank?
|
||||
logger.warn "EMAIL NOT DELIVERED: registrant_verification_asked_at is missing for #{@domain.name}"
|
||||
return
|
||||
end
|
||||
|
||||
return if whitelist_blocked?(@domain.registrant.email)
|
||||
mail(to: @domain.registrant.email,
|
||||
subject: "#{I18n.t(:pending_delete_rejected_notification_subject,
|
||||
name: @domain.name)} [#{@domain.name}]")
|
||||
end
|
||||
end
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
Tere,
|
||||
<br><br>
|
||||
Domeeni <%= @domain.name %> kustutamise taotlus on registreerija <%= @domain.registrar_name %> poolt tagasi lükatud.
|
||||
<br><br>
|
||||
Lugupidamisega<br>
|
||||
Eesti Interneti SA
|
||||
<br><br>
|
||||
<hr>
|
||||
<br><br>
|
||||
Hi,
|
||||
<br><br>
|
||||
Domain <%= @domain.name %> deletion rejected.
|
||||
<br><br>
|
||||
Best Regards,<br>
|
||||
Estonian Internet Foundation
|
|
@ -0,0 +1,15 @@
|
|||
Tere,
|
||||
|
||||
Domeeni <%= @domain.name %> kustutamise taotlus on registreerija <%= @domain.registrar_name %> poolt tagasi lükatud.
|
||||
|
||||
Lugupidamisega
|
||||
Eesti Interneti SA
|
||||
|
||||
--------------------------------------
|
||||
|
||||
Hi,
|
||||
|
||||
Domain <%= @domain.name %> deletion rejected.
|
||||
|
||||
Best Regards,
|
||||
Estonian Internet Foundation
|
Loading…
Add table
Add a link
Reference in a new issue