imap not reading mail which are already read through a mail client

T

Tom Mac

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
 
W

Walton Hoops

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top