Posted By:
TPZ_Stamp
Posted On:
Wednesday, December 4, 2002 05:31 PM
There're four mails in my mail box.Two of them are recent.Now,I want output a message that states how many new mails are in my box.But the output message always says there is no new mail(the variable newMailTotal always be "0").My code is below:
Message[] mList = mFolder.getMessages();
int newMailTotal = 0;
for(int i = 0; i
if( mList[i].getFlags().contains(Flags.Flag.RECENT) ) {
newMailTotal++;
}
}
System.out.println("your have "+newMailTotal+" new mails.");