diff --git a/src/Connection.php b/src/Connection.php index d562ab6a..538080e9 100644 --- a/src/Connection.php +++ b/src/Connection.php @@ -50,9 +50,11 @@ public function expunge(): bool public function close(int $flag = 0): bool { + $stream = $this->resource->getStream(); + $this->resource->clearLastMailboxUsedCache(); - return \imap_close($this->resource->getStream(), $flag); + return \imap_close($stream, $flag); } public function getQuota(string $root = 'INBOX'): array