imap mail fetching problem

Discussion in 'Ruby' started by ssljjfsf 123, Aug 17, 2012.

  1. ssljjfsf 123

    ssljjfsf 123 Guest

    HIII all
    i am trying to fetch the emails of a perticular date...but i am getting some of the emails of a particular date not all the emails of that date...
    my code is as follow


    imap = Net::IMAP.new('imap.googlemail.com',993,true,nil,false)
    imap.login('xyz','xyz')
    imap.examine("INBOX")
    imap.search(["SINCE","17-Aug-2012"]).each do |id|
    email = imap.fetch(id, "BODY[]")[0].attr["BODY[]"]
    mail = Mail.new(email)
    puts "************date***************************"
    puts mail.date.to_s
    puts "************subject************************"
    puts mail.subject
    end
    ssljjfsf 123, Aug 17, 2012
    #1
    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:
    163
    Henrik Ormåsen
    Aug 19, 2006
  2. Jon Fi
    Replies:
    4
    Views:
    505
    Kashia Buch
    Oct 21, 2006
  3. jasonnaylor
    Replies:
    1
    Views:
    242
    jasonnaylor
    Apr 16, 2008
  4. Adam Akhtar
    Replies:
    1
    Views:
    162
    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:
    185
    Eric Hodel
    Jul 4, 2009
Loading...

Share This Page