Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > imap mail fetching problem

Reply
Thread Tools

imap mail fetching problem

 
 
ssljjfsf 123
Guest
Posts: n/a
 
      08-17-2012
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,f alse)
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Support for IMAP IDLE in net/imap Abhishiv Saxena Ruby 4 07-04-2009 04:07 PM
imap and Tmail. Getting whole email with imap Adam Akhtar Ruby 1 12-15-2008 10:55 PM
net/imap - imap.search "TO" can't find email jasonnaylor Ruby 1 04-16-2008 04:05 AM
Writing IMAP->GMail proxy... Where to go for IMAP RFC help? Jon Fi Ruby 4 10-21-2006 09:00 PM
Curier-IMAP and imap.create() Henrik Ormåsen Ruby 0 08-19-2006 06:29 AM



Advertisments