dcparker / ruby-gmail

A Rubyesque interface to Gmail. Connect to Gmail via IMAP and manipulate emails and labels. Send email with your Gmail account via SMTP. Includes full support for parsing and generating MIME messages.
http://dcparker.github.com/ruby-gmail
790 stars 123 forks source link

count from 0 to 1 seems to not work #50

Open yanicklandry opened 11 years ago

yanicklandry commented 11 years ago

On an active connection, the number of unread emails can go from 1 to 0, but not from 0 to 1.

# example : the number of unread emails is at 0
gmail = Gmail.new(...)
puts "unread : #{gmail.inbox.count(:unread)}" # puts 0
# send a test email
puts "unread : #{gmail.inbox.count(:unread)}" # still puts 0
gmail = Gmail.new(...)
puts "unread : #{gmail.inbox.count(:unread)}" # puts 1
# read the email
puts "unread : #{gmail.inbox.count(:unread)}" # puts 0
myobie commented 10 years ago

If you have a longer code example I can test, I'd like to try this out.