@ -26,6 +27,8 @@ public class ImapConnection extends AbstractConnection {
@@ -26,6 +27,8 @@ public class ImapConnection extends AbstractConnection {
protectedstaticfinalintINITIAL=0;
protectedstaticfinalintAUTHENTICATED=2;
protectedRandomrandom=newRandom();
ExchangeSession.FoldercurrentFolder;
ExchangeSession.MessageListmessages;
@ -156,8 +159,8 @@ public class ImapConnection extends AbstractConnection {
@@ -156,8 +159,8 @@ public class ImapConnection extends AbstractConnection {
}else{
sendClient("* OK [UIDNEXT "+(messages.get(messages.size()-1).getUidAsLong()+1)+"]");
//sendClient("* [UNSEEN 1] first unseen message in inbox");
sendClient(commandId+" OK [READ-WRITE] "+command+" completed");
}else{
@ -308,6 +311,12 @@ public class ImapConnection extends AbstractConnection {
@@ -308,6 +311,12 @@ public class ImapConnection extends AbstractConnection {
if("\\Seen".equals(flag)){
properties.put("read","0");
message.read=false;
}elseif("\\Flagged".equals(flag)){
properties.put("flagged","0");
message.flagged=false;
}elseif("Junk".equals(flag)){
properties.put("junk","0");
message.junk=false;
}
}
}elseif("+Flags".equalsIgnoreCase(action)){
@ -319,10 +328,18 @@ public class ImapConnection extends AbstractConnection {
@@ -319,10 +328,18 @@ public class ImapConnection extends AbstractConnection {
@ -378,19 +395,9 @@ public class ImapConnection extends AbstractConnection {
@@ -378,19 +395,9 @@ public class ImapConnection extends AbstractConnection {
@ -439,7 +446,7 @@ public class ImapConnection extends AbstractConnection {
@@ -439,7 +446,7 @@ public class ImapConnection extends AbstractConnection {