From 9269385acdd223803cd34db7237c3b12d3ed0e79 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Mon, 5 Oct 2020 14:27:23 +0200 Subject: [PATCH] Follow up - 85bb77c551a012c43dfecedbf2bd50c360875ee0 - Maintenance: Improved debugging experience of EmailHelper::Probe by adding more logs. --- lib/email_helper/probe.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/email_helper/probe.rb b/lib/email_helper/probe.rb index 14b65fd1d..9fa0a1737 100644 --- a/lib/email_helper/probe.rb +++ b/lib/email_helper/probe.rb @@ -227,7 +227,7 @@ returns on fail driver_instance = driver_class.new result_inbound = driver_instance.fetch(params[:options], nil, 'check') rescue => e - Rails.logger.error e + Rails.logger.debug { e } return { result: 'invalid', @@ -333,6 +333,8 @@ returns on fail mail, ) rescue => e + Rails.logger.debug { e } + # check if sending email was ok, but mailserver rejected if !subject white_map = { @@ -343,8 +345,6 @@ returns on fail next if !e.message.match?(/#{Regexp.escape(key)}/i) - Rails.logger.info e - return { result: 'ok', settings: params, @@ -353,8 +353,6 @@ returns on fail end end - Rails.logger.error e - return { result: 'invalid', settings: params,