FEATURE: allow logging of raw body of all unprocessable email

set log_mail_processing_failures to true to enable
This commit is contained in:
Sam
2015-07-31 15:10:18 +10:00
parent ef0b75386f
commit 6f9dc135ba
3 changed files with 5 additions and 0 deletions

View File

@@ -31,6 +31,9 @@ module Jobs
end
def handle_failure(mail_string, e)
Rails.logger.warn("Email can not be processed: #{e}\n\n#{mail_string}") if SiteSetting.log_mail_processing_failures
template_args = {}
case e
when Email::Receiver::UserNotSufficientTrustLevelError