From: ara.t.howard@... Date: 2006-11-01T00:56:44+09:00 Subject: Re: Getting emails with IMAP generates BadResponseError On Wed, 1 Nov 2006 ruby@diekennichnicht.de wrote: > Hi, > > I have a problem with getting emails from a special account when I will > try to get the emails via IMAP (no SSL). > Here is an example code: > > imap = Net::IMAP.new('imaphost') > imap.login('user', 'pw') > imap.examine('INBOX') > imap.search("ALL").each do |message_id| > ... > end > imap.logout > imap.disconnect > > This works fine with other accounts! > The error occurred in line with imap.search: > > /usr/local/lib/ruby/1.8/net/imap.rb:972:in `get_tagged_response': > Protocol error: command unknown or arguments invalid > (Net::IMAP::BadResponseError) > > My Ruby version is: 1.8.2 (2004-12-25) [i686-linux] > > A "puts imap.capability" on a "good" account shows me: > IMAP4 > IMAP4REV1 > IDLE > AUTH=LOGIN > AUTH=CRAM-MD5 > UNSELECT > LITERAL+ > > For the account with the error I get only: > IMAP4REV1 this is bascially telling you the server does nothing for this accnt... which seems odd. try adding this to the beginning of your script Net::IMAP::debug = true and seeing if it gives you more information. ps. http://www.ietf.org/rfc/rfc2060.txt -a -- my religion is very simple. my religion is kindness. -- the dalai lama