gmailgem / gmail

A Rubyesque interface to Gmail, with all the tools you'll need.
Other
397 stars 119 forks source link

Net::IMAP::BadResponseError: Unknown command #191

Closed tomrossi7 closed 9 years ago

tomrossi7 commented 9 years ago

I keep getting an "Net::IMAP::BadResponseError" whenever I try to do anything:

>   Gmail.connect(username, password) do |gmail|
>       email = gmail.inbox.find(:unread).first
>   end
Net::IMAP::BadResponseError: Unknown command z186mb11740740ybz

I'm on Ruby 1.9.3-p327. Any ideas?

tomrossi7 commented 9 years ago

I think this has the solution! https://github.com/nu7hatch/gmail/issues/36

  1. Go to https://myaccount.google.com
  2. Click on "connected apps & sites"
  3. Set "Allow less secure apps" to "ON" (near the bottom of the page)

If this is correct, we may want to update the docs...

UPDATE: Nevermind, just saw it at the bottom in the troubleshooting section.