Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #6600 > unrolled thread

imap mail fetching problem

Started byssljjfsf 123 <sanjaysalunkhe14@gmail.com>
First post2012-08-17 05:14 -0700
Last post2012-08-17 05:14 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.ruby


Contents

  imap mail fetching problem ssljjfsf 123 <sanjaysalunkhe14@gmail.com> - 2012-08-17 05:14 -0700

#6600 — imap mail fetching problem

Fromssljjfsf 123 <sanjaysalunkhe14@gmail.com>
Date2012-08-17 05:14 -0700
Subjectimap mail fetching problem
Message-ID<eabf98b3-9385-45c1-8fb5-e60f8faed4d7@googlegroups.com>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.ruby


csiph-web