Пример #1
0
$elapsedTime = microtime(true) - $startTime;
print "<h1> {$elapsedTime} :: List all folders </h1>";
$imapClient->getMailboxes();
$elapsedTime = microtime(true) - $startTime;
print "<h1> {$elapsedTime} :: List all subscribed folders </h1>";
$imapClient->listsubscribedMailboxes();
$elapsedTime = microtime(true) - $startTime;
print "<h1> {$elapsedTime} :: Checking for ACL support: ";
if ($imapClient->hasCapability('ACL')) {
    print "<span style='color:green;'>supported</span></h1>";
    $imapClient->getMyRights($testFolder);
    $imapClient->getACLRights($username1, $testFolder);
    if (!empty($username2)) {
        $imapClient->setACL($testFolder, $username2, 'lrswipcda');
        $imapClient->getACLRights($username2, $testFolder);
        $imapClient->deleteACL($testFolder, $username2);
        $imapClient->getACLRights($username2, $testFolder);
    }
    $imapClient->getACL($testFolder);
} else {
    print "<span style='color:red;'>not supported</span></h1>";
}
$elapsedTime = microtime(true) - $startTime;
print "<h1> {$elapsedTime} :: Checking for NAMESPACE support: ";
if ($imapClient->hasCapability('NAMESPACE')) {
    print "<span style='color:green;'>supported</span></h1>";
    $nameSpace = $imapClient->getNameSpace();
    #print "parsed NAMESPACE info:<br>";
    #var_dump($nameSpace);
} else {
    print "<span style='color:red;'>not supported</span></h1>";