Fixed issue #568 - Imap sort errors with gmail in production.log (removed log notice - added comment to source code).
This commit is contained in:
parent
f6083195f0
commit
4b173d02a4
1 changed files with 2 additions and 2 deletions
|
@ -96,10 +96,10 @@ example
|
||||||
@imap.select(options[:folder])
|
@imap.select(options[:folder])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# sort messages by date on server (if not supported), if not fetch messages via search (first in, first out)
|
||||||
begin
|
begin
|
||||||
message_ids = @imap.sort(['DATE'], ['ALL'], 'US-ASCII')
|
message_ids = @imap.sort(['DATE'], ['ALL'], 'US-ASCII')
|
||||||
rescue => e
|
rescue
|
||||||
Rails.logger.error "Unable to use imap sort: #{e.inspect}, use imap search now"
|
|
||||||
message_ids = @imap.search(['ALL'])
|
message_ids = @imap.search(['ALL'])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue