Fixed issue #568 - Imap sort errors with gmail in production.log (removed log notice - added comment to source code).

This commit is contained in:
Martin Edenhofer 2016-12-24 12:40:08 +01:00
parent f6083195f0
commit 4b173d02a4

View file

@ -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