em-imap
em-imap copied to clipboard
uid_search does not work
The uid_search method doesn't work:
EventMachine.run do
imap = EM::IMAP.new('imap.gmail.com', 993, true)
imap.connect.bind! do
imap.login('[email protected]', 'password')
end.bind! do
imap.select('INBOX')
end.bind! do
imap.uid_search("2:*")
end.bind! do |ids|
imap.fetch(ids, "(UID RFC822)")
end.callback do |raw_messages|
puts raw_messages
end.errback do |error|
puts "Connecting or logging in failed: #{error}"
end
end
I am trying to pull the latest emails from the server. I get the error:
Could not parse command
Any way around this?