mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-09 22:48:28 +03:00
Added RFC 2971
This commit is contained in:
parent
85e7cbc206
commit
a7194b74b9
1 changed files with 20 additions and 0 deletions
|
|
@ -1810,6 +1810,26 @@ class ImapClient extends \MailSo\Net\NetClient
|
|||
return $this->SendRequestGetResponse('GETMETADATA', $arguments)->getFolderMetadataResult();
|
||||
}
|
||||
|
||||
/**
|
||||
* Don't have to be logged in to call this command
|
||||
*/
|
||||
public function ServerID() : string
|
||||
{
|
||||
if ($this->IsSupported('ID')) {
|
||||
foreach ($this->SendRequestGetResponse('ID', [null]) as $oResponse) {
|
||||
if ('ID' === $oResponse->ResponseList[1] && \is_array($oResponse->ResponseList[2])) {
|
||||
$c = \count($oResponse->ResponseList[2]);
|
||||
$aResult = [];
|
||||
for ($i = 0; $i < $c; $i += 2) {
|
||||
$aResult[] = $oResponse->ResponseList[2][$i] . '=' . $oResponse->ResponseList[2][$i+1];
|
||||
}
|
||||
return \implode(' ', $aResult);
|
||||
}
|
||||
}
|
||||
}
|
||||
return 'UNKNOWN';
|
||||
}
|
||||
|
||||
public function ServerGetMetadata(array $aEntries, array $aOptions = []) : array
|
||||
{
|
||||
return $this->IsSupported('METADATA-SERVER')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue