summaryrefslogtreecommitdiffstats
path: root/lib/redmine/imap.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-06-22 13:14:45 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-06-22 13:14:45 +0000
commit8b6dd3fdcd5c5d0d52cab2d22623971c1adb1944 (patch)
tree6d5aaaa1338e4a0a482f42519daa352fedcdf5aa /lib/redmine/imap.rb
parent8b33565b3e7bbca7ec2ef4aeedba4eb20cb66bdc (diff)
downloadredmine-8b6dd3fdcd5c5d0d52cab2d22623971c1adb1944.tar.gz
redmine-8b6dd3fdcd5c5d0d52cab2d22623971c1adb1944.zip
IMAP: fetch unseen messages only.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1572 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/imap.rb')
-rw-r--r--lib/redmine/imap.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/redmine/imap.rb b/lib/redmine/imap.rb
index aceb75cb2..a6cd958cd 100644
--- a/lib/redmine/imap.rb
+++ b/lib/redmine/imap.rb
@@ -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)