IMAP: fetch unseen messages only.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1572 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
8b33565b3e
commit
8b6dd3fdcd
|
@ -29,7 +29,7 @@ module Redmine
|
|||
imap = Net::IMAP.new(host, port, ssl)
|
||||
imap.login(imap_options[:username], imap_options[:password]) unless imap_options[:username].nil?
|
||||
imap.select(folder)
|
||||
imap.search(['ALL']).each do |message_id|
|
||||
imap.search(['NOT', 'SEEN']).each do |message_id|
|
||||
msg = imap.fetch(message_id,'RFC822')[0].attr['RFC822']
|
||||
logger.debug "Receiving message #{message_id}" if logger && logger.debug?
|
||||
if MailHandler.receive(msg, options)
|
||||
|
|
Loading…
Reference in New Issue