Added registrant successful email confirmation #2557

This commit is contained in:
Priit Tark 2015-07-14 18:29:02 +03:00
parent 9f2d87606d
commit 8102b8f1a2
11 changed files with 169 additions and 18 deletions

View file

@ -3,7 +3,7 @@ class DomainMailer < ApplicationMailer
@domain = domain
return if Rails.env.production? ? false : !TEST_EMAILS.include?(@domain.registrant_email)
# turn on delivery on specific request only, thus rake tasks does not deliver anything
# turn on delivery on specific EPP request only, thus rake tasks does not deliver anything
return if @domain.deliver_emails != true
if @domain.registrant_verification_token.blank?
@ -25,11 +25,22 @@ class DomainMailer < ApplicationMailer
subject: "#{I18n.t(:domain_registrant_pending_updated_subject, name: @domain.name)} [#{@domain.name}]")
end
def registrant_updated(domain)
@domain = domain
return if Rails.env.production? ? false : !TEST_EMAILS.include?(@domain.registrant_email)
# turn on delivery on specific EPP request only, thus rake tasks does not deliver anything
return if @domain.deliver_emails != true
mail(to: @domain.registrant_email,
subject: "#{I18n.t(:domain_registrant_updated, name: @domain.name)} [#{@domain.name}]")
end
def pending_deleted(domain)
@domain = domain
return if Rails.env.production? ? false : !TEST_EMAILS.include?(@domain.registrant_email)
# turn on delivery on specific request only, thus rake tasks does not deliver anything
# turn on delivery on specific EPP request only, thus rake tasks does not deliver anything
return if @domain.deliver_emails != true
if @domain.registrant_verification_token.blank?