mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 18:29:40 +02:00
Do not show address in domain mailer unless address processing is disabled
#330
This commit is contained in:
parent
55571b3953
commit
01c6804d2a
5 changed files with 26 additions and 8 deletions
|
@ -8,6 +8,7 @@ class DomainMailer < ApplicationMailer
|
|||
|
||||
@old_registrant = Registrant.find(old_registrant_id)
|
||||
@new_registrant = Registrant.find(new_registrant_id)
|
||||
@address_processing = Contact.address_processing?
|
||||
|
||||
return if whitelist_blocked?(@new_registrant.email)
|
||||
mail(to: format(@new_registrant.email),
|
||||
|
@ -23,6 +24,7 @@ class DomainMailer < ApplicationMailer
|
|||
|
||||
@old_registrant = Registrant.find(old_registrant_id)
|
||||
@new_registrant = Registrant.find(new_registrant_id)
|
||||
@address_processing = Contact.address_processing?
|
||||
|
||||
return if whitelist_blocked?(@old_registrant.email)
|
||||
mail(to: format(@old_registrant.email),
|
||||
|
|
|
@ -10,9 +10,11 @@ Nimi: <%= @new_registrant.name %><br>
|
|||
Äriregistrikood: <%= @new_registrant.ident %><br>
|
||||
<% end %>
|
||||
Epost: <%= @new_registrant.email %><br>
|
||||
<% if @address_processing -%>
|
||||
Tänav: <%= @new_registrant.street %><br>
|
||||
Linn: <%= @new_registrant.city %><br>
|
||||
Riik: <%= @new_registrant.country.try(:name) %>
|
||||
Riik: <%= @new_registrant.country.name %>
|
||||
<% end -%>
|
||||
<br><br>
|
||||
Lugupidamisega<br>
|
||||
Eesti Interneti Sihtasutus
|
||||
|
@ -31,9 +33,11 @@ Name: <%= @new_registrant.name %><br>
|
|||
Business Registry code: <%= @new_registrant.ident %><br>
|
||||
<% end %>
|
||||
E-mail: <%= @new_registrant.email %><br>
|
||||
<% if @address_processing -%>
|
||||
Street: <%= @new_registrant.street %><br>
|
||||
City: <%= @new_registrant.city %><br>
|
||||
Country: <%= @new_registrant.country.try(:name) %>
|
||||
Country: <%= @new_registrant.country.name %>
|
||||
<% end -%>
|
||||
<br><br>
|
||||
Best Regards,<br>
|
||||
Estonian Internet Foundation
|
||||
|
|
|
@ -11,9 +11,11 @@ Nimi: <%= @new_registrant.name %>
|
|||
Äriregistrikood: <%= @new_registrant.ident %>
|
||||
<% end %>
|
||||
Epost: <%= @new_registrant.email %>
|
||||
<% if @address_processing -%>
|
||||
Tänav: <%= @new_registrant.street %>
|
||||
Linn: <%= @new_registrant.city %>
|
||||
Riik: <%= @new_registrant.country.try(:name) %>
|
||||
Riik: <%= @new_registrant.country.name %>
|
||||
<% end -%>
|
||||
|
||||
Lugupidamisega
|
||||
Eesti Interneti Sihtasutus
|
||||
|
@ -33,9 +35,11 @@ Name: <%= @new_registrant.name %>
|
|||
Business Registry code: <%= @new_registrant.ident %>
|
||||
<% end %>
|
||||
E-mail: <%= @new_registrant.email %>
|
||||
<% if @address_processing -%>
|
||||
Street: <%= @new_registrant.street %>
|
||||
City: <%= @new_registrant.city %>
|
||||
Country: <%= @new_registrant.country.try(:name) %>
|
||||
Country: <%= @new_registrant.country.name %>
|
||||
<% end -%>
|
||||
|
||||
Best Regards,
|
||||
Estonian Internet Foundation
|
||||
|
|
|
@ -10,9 +10,11 @@ Isikukood: <%= @new_registrant.ident %><br>
|
|||
Äriregistrikood: <%= @new_registrant.ident %><br>
|
||||
<% end %>
|
||||
Epost: <%= @new_registrant.email %><br>
|
||||
<% if @address_processing -%>
|
||||
Tänav: <%= @new_registrant.street %><br>
|
||||
Linn: <%= @new_registrant.city %><br>
|
||||
Riik: <%= @new_registrant.country.try(:name) %>
|
||||
Riik: <%= @new_registrant.country.name %>
|
||||
<% end -%>
|
||||
<br><br>
|
||||
Lugupidamisega<br>
|
||||
Eesti Interneti Sihtasutus
|
||||
|
@ -31,9 +33,11 @@ Personal code: <%= @new_registrant.ident %><br>
|
|||
Business Registry code: <%= @new_registrant.ident %><br>
|
||||
<% end %>
|
||||
E-mail: <%= @new_registrant.email %><br>
|
||||
<% if @address_processing -%>
|
||||
Street: <%= @new_registrant.street %><br>
|
||||
City: <%= @new_registrant.city %><br>
|
||||
Country: <%= @new_registrant.country.try(:name) %>
|
||||
Country: <%= @new_registrant.country.name %>
|
||||
<% end -%>
|
||||
<br><br>
|
||||
Best Regards,<br>
|
||||
Estonian Internet Foundation
|
||||
|
|
|
@ -11,9 +11,11 @@ Isikukood: <%= @new_registrant.ident %>
|
|||
Äriregistrikood: <%= @new_registrant.ident %>
|
||||
<% end %>
|
||||
Epost: <%= @new_registrant.email %>
|
||||
<% if @address_processing -%>
|
||||
Tänav: <%= @new_registrant.street %>
|
||||
Linn: <%= @new_registrant.city %>
|
||||
Riik: <%= @new_registrant.country.try(:name) %>
|
||||
Riik: <%= @new_registrant.country.name %>
|
||||
<% end -%>
|
||||
|
||||
Lugupidamisega
|
||||
Eesti Interneti Sihtasutus
|
||||
|
@ -33,9 +35,11 @@ Personal code: <%= @new_registrant.ident %>
|
|||
Business Registry code: <%= @new_registrant.ident %>
|
||||
<% end %>
|
||||
E-mail: <%= @new_registrant.email %>
|
||||
<% if @address_processing -%>
|
||||
Street: <%= @new_registrant.street %>
|
||||
City: <%= @new_registrant.city %>
|
||||
Country: <%= @new_registrant.country.try(:name) %>
|
||||
Country: <%= @new_registrant.country.name %>
|
||||
<% end -%>
|
||||
|
||||
Best Regards,
|
||||
Estonian Internet Foundation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue