Skip to content

Commit 74b5921

Browse files
committed
fix: check mailbox capabilities
1 parent b909d4f commit 74b5921

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Folder.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ public function select(bool $force = false): void
160160
*/
161161
public function quota(): array
162162
{
163+
if (! in_array('QUOTA', $this->mailbox->capabilities())) {
164+
throw new ImapCapabilityException('Unable to fetch mailbox quotas. IMAP server does not support QUOTA capability.');
165+
}
166+
163167
$responses = $this->mailbox->connection()->quotaRoot($this->path);
164168

165169
$values = [];

0 commit comments

Comments
 (0)