mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +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.flatten
|
||||
emails.each do |email|
|
||||
next unless TEST_EMAILS.include?(email)
|
||||
logger.warn "EMAIL SENDING WAS BLOCKED BY WHITELIST: #{email}"
|
||||
next if TEST_EMAILS.include?(email)
|
||||
logger.info "EMAIL SENDING WAS BLOCKED BY WHITELIST: #{email}"
|
||||
return true
|
||||
end
|
||||
false
|
||||
|
@ -18,7 +18,7 @@ class ApplicationMailer < ActionMailer::Base
|
|||
# turn on delivery on specific (epp) request only, thus rake tasks does not deliver anything
|
||||
def delivery_off?(model)
|
||||
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"
|
||||
true
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue