mirror of
https://github.com/internetee/registry.git
synced 2025-05-29 17:10:08 +02:00
Story#107821878 - ContactsMailer#email_updated gets new attribute old_email
This commit is contained in:
parent
4fa286d0b0
commit
7b02f98af8
4 changed files with 9 additions and 7 deletions
|
@ -1,8 +1,10 @@
|
|||
class ContactMailer < ApplicationMailer
|
||||
include Que::Mailer
|
||||
|
||||
def email_updated(email, contact_id, should_deliver)
|
||||
@contact = Contact.find_by(id: contact_id)
|
||||
def email_updated(old_email, email, contact_id, should_deliver)
|
||||
@contact = Contact.find_by(id: contact_id)
|
||||
@old_email = old_email
|
||||
|
||||
return unless email || @contact
|
||||
return if delivery_off?(@contact, should_deliver)
|
||||
return if whitelist_blocked?(email)
|
||||
|
|
|
@ -50,7 +50,7 @@ class Contact < ActiveRecord::Base
|
|||
emails << domains.map(&:registrant_email) if domains.present?
|
||||
emails = emails.flatten.uniq
|
||||
emails.each do |e|
|
||||
ContactMailer.email_updated(e, id, deliver_emails).deliver
|
||||
ContactMailer.email_updated(email_was, e, id, deliver_emails).deliver
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Tere <%= @contact.name %>
|
||||
<br><br>
|
||||
Kontakti <%= @contact.name %> eposti aadress on muudetud<br>
|
||||
endine aadress: <%= @contact.email_was %><br>
|
||||
endine aadress: <%= @old_email %><br>
|
||||
uus aadress: <%= @contact.email %>
|
||||
<br><br>
|
||||
Eposti aadressile saadetakse domeenidega seotud infot seal hulgas kinnitustaotluseid omaniku vahetuse ja domeeni kustutamise korral. Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduga oma registripidaja poole. Teie registripidaja on <%= @contact.registrar.name %>
|
||||
|
@ -30,7 +30,7 @@ Eesti Interneti SA
|
|||
Hi <%= @contact.name %>
|
||||
<br><br>
|
||||
E-mail address of <%= @contact.name %> has been changed<br>
|
||||
previous address: <%= @contact.email_was %><br>
|
||||
previous address: <%= @old_email %><br>
|
||||
new address: <%= @contact.email %>
|
||||
<br><br>
|
||||
E-mail addresses are used to send important information regarding your registered domains including applications for approval of registrant change and domain deletion. Please make sure that the update and contact information are correct. Incase of problems please turn to your registrar. Your registrar is <%= @contact.registrar.name %>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Tere <%= @contact.name %>
|
||||
|
||||
Kontakti <%= @contact.name %> eposti aadress on muudetud
|
||||
endine aadress: <%= @contact.email_was %>
|
||||
endine aadress: <%= @old_email %>
|
||||
uus aadress: <%= @contact.email %>
|
||||
|
||||
Eposti aadressile saadetakse domeenidega seotud infot seal hulgas kinnitustaotluseid omaniku vahetuse ja domeeni kustutamise korral. Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduga oma registripidaja poole. Teie registripidaja on <%= @contact.registrar.name %>
|
||||
|
@ -30,7 +30,7 @@ Eesti Interneti SA
|
|||
Hi <%= @contact.name %>
|
||||
|
||||
E-mail address of <%= @contact.name %> has been changed
|
||||
previous address: <%= @contact.email_was %>
|
||||
previous address: <%= @old_email %>
|
||||
new address: <%= @contact.email %>
|
||||
|
||||
E-mail addresses are used to send important information regarding your registered domains including applications for approval of registrant change and domain deletion. Please make sure that the update and contact information are correct. Incase of problems please turn to your registrar. Your registrar is <%= @contact.registrar.name %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue