Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.ruby > #6600 > unrolled thread
| Started by | ssljjfsf 123 <sanjaysalunkhe14@gmail.com> |
|---|---|
| First post | 2012-08-17 05:14 -0700 |
| Last post | 2012-08-17 05:14 -0700 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.ruby
imap mail fetching problem ssljjfsf 123 <sanjaysalunkhe14@gmail.com> - 2012-08-17 05:14 -0700
| From | ssljjfsf 123 <sanjaysalunkhe14@gmail.com> |
|---|---|
| Date | 2012-08-17 05:14 -0700 |
| Subject | imap 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
Back to top | Article view | comp.lang.ruby
csiph-web