imap mail fetching problem

S

ssljjfsf 123

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top