Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.ruby > #6600
| From | ssljjfsf 123 <sanjaysalunkhe14@gmail.com> |
|---|---|
| Newsgroups | comp.lang.ruby |
| Subject | imap mail fetching problem |
| Date | 2012-08-17 05:14 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <eabf98b3-9385-45c1-8fb5-e60f8faed4d7@googlegroups.com> (permalink) |
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
Back to comp.lang.ruby | Previous | Next | Find similar
imap mail fetching problem ssljjfsf 123 <sanjaysalunkhe14@gmail.com> - 2012-08-17 05:14 -0700
csiph-web