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

Discussion in 'Ruby' started by Tom Mac, May 3, 2011.

  1. Tom Mac

    Tom Mac Guest

    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


    --
    Posted via http://www.ruby-forum.com/.
    Tom Mac, May 3, 2011
    #1
    1. Advertising

  2. Tom Mac

    Walton Hoops Guest

    Re: imap not reading mail which are already read through a mailclient

    -----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-----
    Walton Hoops, May 3, 2011
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Henrik Ormåsen

    Curier-IMAP and imap.create()

    Henrik Ormåsen, Aug 19, 2006, in forum: Ruby
    Replies:
    0
    Views:
    175
    Henrik Ormåsen
    Aug 19, 2006
  2. Jon Fi
    Replies:
    4
    Views:
    522
    Kashia Buch
    Oct 21, 2006
  3. jasonnaylor
    Replies:
    1
    Views:
    250
    jasonnaylor
    Apr 16, 2008
  4. Adam Akhtar
    Replies:
    1
    Views:
    175
    Eric Hodel
    Dec 15, 2008
  5. Abhishiv Saxena

    Support for IMAP IDLE in net/imap

    Abhishiv Saxena, Jul 3, 2009, in forum: Ruby
    Replies:
    4
    Views:
    191
    Eric Hodel
    Jul 4, 2009
Loading...

Share This Page