Esempio n. 1
0
echo "Now set script 2 as active...\n";
if (!PEAR::isError($error = $sieve->setActive($sieve_script_name2))) {
    echo "  script '{$sieve_script_name2}' marked as active ok!\n";
} else {
    echo "  there was an error trying to mark as active the script '{$sieve_script_name2}'. The error is: " . $error->getMessage() . "\n";
}
echo "\n";
echo "Now get the active script....\n";
if (!PEAR::isError($error = $script = $sieve->getActive())) {
    echo "the script marked as active is: {$script}\n";
} else {
    echo "  there was an error trying to get the activescript, the error is:" . $script->getMessage();
}
echo "\n";
echo "The server has the following extensions:\n";
$exts = $sieve->getExtensions();
for ($i = 0; $i < count($exts); $i++) {
    echo sprintf("    %s. %s\n", $i + 1, $exts[$i]);
}
echo "\n";
$ext = 'pichula';
if ($sieve->hasExtension($ext)) {
    echo "this server supports the '{$ext}' extenssion\n";
} else {
    echo "this server does not supports the '{$ext}' extenssion\n";
}
echo "\n";
$ext = 'fileinto';
if ($sieve->hasExtension($ext)) {
    echo "this server supports the '{$ext}' extenssion\n";
} else {