Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uid_search does not work #24

Open
JohnMerlino1 opened this issue Sep 29, 2016 · 0 comments
Open

uid_search does not work #24

JohnMerlino1 opened this issue Sep 29, 2016 · 0 comments

Comments

@JohnMerlino1
Copy link

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('user@gmail.com', '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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant