mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 09:43:36 +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)
|
@old_registrant = Registrant.find(old_registrant_id)
|
||||||
@new_registrant = Registrant.find(new_registrant_id)
|
@new_registrant = Registrant.find(new_registrant_id)
|
||||||
|
@address_processing = Contact.address_processing?
|
||||||
|
|
||||||
return if whitelist_blocked?(@new_registrant.email)
|
return if whitelist_blocked?(@new_registrant.email)
|
||||||
mail(to: format(@new_registrant.email),
|
mail(to: format(@new_registrant.email),
|
||||||
|
@ -23,6 +24,7 @@ class DomainMailer < ApplicationMailer
|
||||||
|
|
||||||
@old_registrant = Registrant.find(old_registrant_id)
|
@old_registrant = Registrant.find(old_registrant_id)
|
||||||
@new_registrant = Registrant.find(new_registrant_id)
|
@new_registrant = Registrant.find(new_registrant_id)
|
||||||
|
@address_processing = Contact.address_processing?
|
||||||
|
|
||||||
return if whitelist_blocked?(@old_registrant.email)
|
return if whitelist_blocked?(@old_registrant.email)
|
||||||
mail(to: format(@old_registrant.email),
|
mail(to: format(@old_registrant.email),
|
||||||
|
|
|
@ -10,9 +10,11 @@ Nimi: <%= @new_registrant.name %><br>
|
||||||
Äriregistrikood: <%= @new_registrant.ident %><br>
|
Äriregistrikood: <%= @new_registrant.ident %><br>
|
||||||
<% end %>
|
<% end %>
|
||||||
Epost: <%= @new_registrant.email %><br>
|
Epost: <%= @new_registrant.email %><br>
|
||||||
|
<% if @address_processing -%>
|
||||||
Tänav: <%= @new_registrant.street %><br>
|
Tänav: <%= @new_registrant.street %><br>
|
||||||
Linn: <%= @new_registrant.city %><br>
|
Linn: <%= @new_registrant.city %><br>
|
||||||
Riik: <%= @new_registrant.country.try(:name) %>
|
Riik: <%= @new_registrant.country.name %>
|
||||||
|
<% end -%>
|
||||||
<br><br>
|
<br><br>
|
||||||
Lugupidamisega<br>
|
Lugupidamisega<br>
|
||||||
Eesti Interneti Sihtasutus
|
Eesti Interneti Sihtasutus
|
||||||
|
@ -31,9 +33,11 @@ Name: <%= @new_registrant.name %><br>
|
||||||
Business Registry code: <%= @new_registrant.ident %><br>
|
Business Registry code: <%= @new_registrant.ident %><br>
|
||||||
<% end %>
|
<% end %>
|
||||||
E-mail: <%= @new_registrant.email %><br>
|
E-mail: <%= @new_registrant.email %><br>
|
||||||
|
<% if @address_processing -%>
|
||||||
Street: <%= @new_registrant.street %><br>
|
Street: <%= @new_registrant.street %><br>
|
||||||
City: <%= @new_registrant.city %><br>
|
City: <%= @new_registrant.city %><br>
|
||||||
Country: <%= @new_registrant.country.try(:name) %>
|
Country: <%= @new_registrant.country.name %>
|
||||||
|
<% end -%>
|
||||||
<br><br>
|
<br><br>
|
||||||
Best Regards,<br>
|
Best Regards,<br>
|
||||||
Estonian Internet Foundation
|
Estonian Internet Foundation
|
||||||
|
|
|
@ -11,9 +11,11 @@ Nimi: <%= @new_registrant.name %>
|
||||||
Äriregistrikood: <%= @new_registrant.ident %>
|
Äriregistrikood: <%= @new_registrant.ident %>
|
||||||
<% end %>
|
<% end %>
|
||||||
Epost: <%= @new_registrant.email %>
|
Epost: <%= @new_registrant.email %>
|
||||||
|
<% if @address_processing -%>
|
||||||
Tänav: <%= @new_registrant.street %>
|
Tänav: <%= @new_registrant.street %>
|
||||||
Linn: <%= @new_registrant.city %>
|
Linn: <%= @new_registrant.city %>
|
||||||
Riik: <%= @new_registrant.country.try(:name) %>
|
Riik: <%= @new_registrant.country.name %>
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
Lugupidamisega
|
Lugupidamisega
|
||||||
Eesti Interneti Sihtasutus
|
Eesti Interneti Sihtasutus
|
||||||
|
@ -33,9 +35,11 @@ Name: <%= @new_registrant.name %>
|
||||||
Business Registry code: <%= @new_registrant.ident %>
|
Business Registry code: <%= @new_registrant.ident %>
|
||||||
<% end %>
|
<% end %>
|
||||||
E-mail: <%= @new_registrant.email %>
|
E-mail: <%= @new_registrant.email %>
|
||||||
|
<% if @address_processing -%>
|
||||||
Street: <%= @new_registrant.street %>
|
Street: <%= @new_registrant.street %>
|
||||||
City: <%= @new_registrant.city %>
|
City: <%= @new_registrant.city %>
|
||||||
Country: <%= @new_registrant.country.try(:name) %>
|
Country: <%= @new_registrant.country.name %>
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
Best Regards,
|
Best Regards,
|
||||||
Estonian Internet Foundation
|
Estonian Internet Foundation
|
||||||
|
|
|
@ -10,9 +10,11 @@ Isikukood: <%= @new_registrant.ident %><br>
|
||||||
Äriregistrikood: <%= @new_registrant.ident %><br>
|
Äriregistrikood: <%= @new_registrant.ident %><br>
|
||||||
<% end %>
|
<% end %>
|
||||||
Epost: <%= @new_registrant.email %><br>
|
Epost: <%= @new_registrant.email %><br>
|
||||||
|
<% if @address_processing -%>
|
||||||
Tänav: <%= @new_registrant.street %><br>
|
Tänav: <%= @new_registrant.street %><br>
|
||||||
Linn: <%= @new_registrant.city %><br>
|
Linn: <%= @new_registrant.city %><br>
|
||||||
Riik: <%= @new_registrant.country.try(:name) %>
|
Riik: <%= @new_registrant.country.name %>
|
||||||
|
<% end -%>
|
||||||
<br><br>
|
<br><br>
|
||||||
Lugupidamisega<br>
|
Lugupidamisega<br>
|
||||||
Eesti Interneti Sihtasutus
|
Eesti Interneti Sihtasutus
|
||||||
|
@ -31,9 +33,11 @@ Personal code: <%= @new_registrant.ident %><br>
|
||||||
Business Registry code: <%= @new_registrant.ident %><br>
|
Business Registry code: <%= @new_registrant.ident %><br>
|
||||||
<% end %>
|
<% end %>
|
||||||
E-mail: <%= @new_registrant.email %><br>
|
E-mail: <%= @new_registrant.email %><br>
|
||||||
|
<% if @address_processing -%>
|
||||||
Street: <%= @new_registrant.street %><br>
|
Street: <%= @new_registrant.street %><br>
|
||||||
City: <%= @new_registrant.city %><br>
|
City: <%= @new_registrant.city %><br>
|
||||||
Country: <%= @new_registrant.country.try(:name) %>
|
Country: <%= @new_registrant.country.name %>
|
||||||
|
<% end -%>
|
||||||
<br><br>
|
<br><br>
|
||||||
Best Regards,<br>
|
Best Regards,<br>
|
||||||
Estonian Internet Foundation
|
Estonian Internet Foundation
|
||||||
|
|
|
@ -11,9 +11,11 @@ Isikukood: <%= @new_registrant.ident %>
|
||||||
Äriregistrikood: <%= @new_registrant.ident %>
|
Äriregistrikood: <%= @new_registrant.ident %>
|
||||||
<% end %>
|
<% end %>
|
||||||
Epost: <%= @new_registrant.email %>
|
Epost: <%= @new_registrant.email %>
|
||||||
|
<% if @address_processing -%>
|
||||||
Tänav: <%= @new_registrant.street %>
|
Tänav: <%= @new_registrant.street %>
|
||||||
Linn: <%= @new_registrant.city %>
|
Linn: <%= @new_registrant.city %>
|
||||||
Riik: <%= @new_registrant.country.try(:name) %>
|
Riik: <%= @new_registrant.country.name %>
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
Lugupidamisega
|
Lugupidamisega
|
||||||
Eesti Interneti Sihtasutus
|
Eesti Interneti Sihtasutus
|
||||||
|
@ -33,9 +35,11 @@ Personal code: <%= @new_registrant.ident %>
|
||||||
Business Registry code: <%= @new_registrant.ident %>
|
Business Registry code: <%= @new_registrant.ident %>
|
||||||
<% end %>
|
<% end %>
|
||||||
E-mail: <%= @new_registrant.email %>
|
E-mail: <%= @new_registrant.email %>
|
||||||
|
<% if @address_processing -%>
|
||||||
Street: <%= @new_registrant.street %>
|
Street: <%= @new_registrant.street %>
|
||||||
City: <%= @new_registrant.city %>
|
City: <%= @new_registrant.city %>
|
||||||
Country: <%= @new_registrant.country.try(:name) %>
|
Country: <%= @new_registrant.country.name %>
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
Best Regards,
|
Best Regards,
|
||||||
Estonian Internet Foundation
|
Estonian Internet Foundation
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue