고맙습니다 만나요 당신은 내 일 저장 하자 나는 내가 한 일로 답을 완성하고 누군가가 유용하다고 생각할지도 모른다. STORE <<startScope>>:<<endScope>> +FLAGS (\Delete)
이 제 경우의 실제 솔루션입니다. 지금은이 같은 것을 사용하고 있습니다 :
private Object storeDeletion(IMAPProtocol protocol, int startID, int endID)
throws ProtocolException{
String args = Integer.toString(startID) + ":"
+ Integer.toString(endID)
+ " +FLAGS" + " (\\Deleted)";
Response[] r = protocol.command("STORE " + args, null);
int notDeleted = 0;
for (Response res : r) {
// do something here with each response, but avoid last one (summary response)
}
// dispatch remaining untagged responses
protocol.notifyResponseHandlers(r);
protocol.handleResult(r[r.length-1]);
return "" + (r.length - notDeleted - 1);
}
당신이 +FLAGS.SILENT
대신 +FLAGS
사용할 수있는 모든 응답을 확인하지 않으려면. notDeleted는 어떤 이유로 든 삭제 된 것으로 표시 될 수없는 모든 문제가있는 메일에 대해 for 루프 내에서 증가됩니다.
예, 정확히 시퀀스 집합이 의미하는 바입니다. 도움이되어 기쁘다. :) – Gigi