From 4b173d02a4fcd3d7d4bc5340e6f27255fe746296 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sat, 24 Dec 2016 12:40:08 +0100 Subject: [PATCH] Fixed issue #568 - Imap sort errors with gmail in production.log (removed log notice - added comment to source code). --- app/models/channel/driver/imap.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/channel/driver/imap.rb b/app/models/channel/driver/imap.rb index 0f55f9c9f..ff6fafe1d 100644 --- a/app/models/channel/driver/imap.rb +++ b/app/models/channel/driver/imap.rb @@ -96,10 +96,10 @@ example @imap.select(options[:folder]) end + # sort messages by date on server (if not supported), if not fetch messages via search (first in, first out) begin message_ids = @imap.sort(['DATE'], ['ALL'], 'US-ASCII') - rescue => e - Rails.logger.error "Unable to use imap sort: #{e.inspect}, use imap search now" + rescue message_ids = @imap.search(['ALL']) end