mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
Email block list logging and fix
This commit is contained in:
parent
0a0543c715
commit
1c7febf47a
1 changed files with 3 additions and 3 deletions
|
@ -8,8 +8,8 @@ class ApplicationMailer < ActionMailer::Base
|
||||||
emails = [emails] unless emails.is_a?(Array)
|
emails = [emails] unless emails.is_a?(Array)
|
||||||
emails = emails.flatten
|
emails = emails.flatten
|
||||||
emails.each do |email|
|
emails.each do |email|
|
||||||
next unless TEST_EMAILS.include?(email)
|
next if TEST_EMAILS.include?(email)
|
||||||
logger.warn "EMAIL SENDING WAS BLOCKED BY WHITELIST: #{email}"
|
logger.info "EMAIL SENDING WAS BLOCKED BY WHITELIST: #{email}"
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
false
|
false
|
||||||
|
@ -18,7 +18,7 @@ class ApplicationMailer < ActionMailer::Base
|
||||||
# turn on delivery on specific (epp) request only, thus rake tasks does not deliver anything
|
# turn on delivery on specific (epp) request only, thus rake tasks does not deliver anything
|
||||||
def delivery_off?(model)
|
def delivery_off?(model)
|
||||||
return false if model.deliver_emails == true
|
return false if model.deliver_emails == true
|
||||||
logger.warn "EMAIL SENDING WAS NOT ACTIVATED " \
|
logger.info "EMAIL SENDING WAS NOT ACTIVATED " \
|
||||||
"BY MODEL OBJECT: id ##{model.try(:id)} deliver_emails returned false"
|
"BY MODEL OBJECT: id ##{model.try(:id)} deliver_emails returned false"
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue