php-imap
php-imap copied to clipboard
Wrong folder status?
Maybe I miss something but it seems, that the folder status isn't reliable or not up to date in every situation.
I get the folder with
$folder->getStatus()
Result is:
["flags"]=>
array(1) {
[0]=>
array(6) {
[0]=>
string(9) "\Answered"
[1]=>
string(8) "\Flagged"
[2]=>
string(8) "\Deleted"
[3]=>
string(5) "\Seen"
[4]=>
string(6) "\Draft"
[5]=>
string(10) "$Forwarded"
}
}
["exists"]=>
int(12)
["recent"]=>
int(0)
["unseen"]=>
int(1)
["uidvalidity"]=>
int(1645189988)
["uidnext"]=>
int(14)
}
If I fetch the unseen messages with
$folder->query()->unseen()->get();
it says 4 which is correct. Furthermore the value of uidvalidity doesn't change, where uidnext is correct. Is there a way or is it needed to update the status or force an update so that the given data will match the server status?