Skip to content

uid_search does not work #24

Description

@JohnMerlino1

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions