From: Walton Hoops Date: 2011-05-04T07:28:54+09:00 Subject: Re: imap not reading mail which are already read through a mail client -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 5/2/2011 10:34 PM, Tom Mac wrote: > Hi > I am trying to use 'net/imap' to get mail from a gmail account. I am > attaching the code. My problem is, suppose if a new mail comes to gmail > inbox and I have read that through either gmail directly or using > thunder bird. Then I can't read that using my code (which I am > attaching). Please help. I am using ruby 1.8.7 > > Thanks > > Attachments: > http://www.ruby-forum.com/attachment/6154/imap.rb > > - From the code: imap.uid_search(["NOT", "SEEN"]).each_with_index do |uid,i| If you've read it in Gmail and/or Firefox, it's seen. You probably want: imap.uid_search(["ALL"]). Good luck! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJNwIFPAAoJELvwGgGC0IsyJacIAOuAp+suwkzRXQ4jl0S5GtXH 4xOgnA/XEPqQqA9nLbVQF76HDdHv4QHwxiI0Whi0iIoLKQBtcOxuCoSoQ9j2EKpM PrqjcA+n6/kez5RX0CMwF6UwEluzIOVr0j0DfhZ7JqpdvA19T2CKlrGlTMOcXyAt lcsmoLGx7SkjS3CcJgij49d/cNkKXxAIK/CBFCnjvw3ExhmCdc9VkBHXDyJpTRmf 3uNRC8RVZchL9F9LDB2qmOsxtIVO6ec8e39NJG8OsBhpxXi9+q15p3R9bf9Ktiug H+yFvo+CM1DfFP5xrWnwiEP7od5RuL+YCeTsxztVQihK910xaUgO2M/ecM4n3P8= =FXdE -----END PGP SIGNATURE-----