--- trunk/IMAPHandler/IMAPHandler.cpp 2003/04/01 06:44:44 113 +++ trunk/IMAPHandler/IMAPHandler.cpp 2003/04/01 07:08:58 114 @@ -241,7 +241,30 @@ string IMAPHandler::imap(const string& i { string result; - // + string sequence = command(); + putline(sequence + " " + imap + " " + args); + putline(message); + + while (true) + { + string input = getline(); + + if (input.find(sequence + " OK") == 0) + { + success = true; + break; + } + else if (input.find(sequence + " NO") == 0 || input.find(sequence + + " BAD") == 0) + { + success = false; + break; + } + else + { + result += input + "\r\n"; + } + } return result; }