If you want to disable the quotas again, set them to -1.
$mbox = imap_open ("{your.imap.host:143}", "mailadmin", "password");
if(!imap_set_quota($mbox, "user.kalowsky", -1)) {
print "Error in deleting quota\n";
return;
}
imap_close($mbox);
imap_set_quota
(PHP 4 >= 4.0.5, PHP 5)
imap_set_quota — 指定したメールボックスにクォータを設定する
説明
bool imap_set_quota ( resource $imap_stream, string $quota_root, int $quota_limit )メールボックス単位でクォータ上限(最大容量)を設定します。
パラメータ
- imap_stream
imap_open() が返す IMAP ストリーム。
- quota_root
クォータを設定するメールボックス。 これは、メールボックスの IMAP 標準フォーマット 'user.name' に基づき指定する必要があります。
- quota_limit
quota_root の最大サイズ (KB 単位)。
返り値
成功した場合に TRUE を、失敗した場合に FALSE を返します。
例
例 1017. imap_set_quota() の例
<?php
$mbox = imap_open("{imap.example.org:143}", "mailadmin", "password");
if (!imap_set_quota($mbox, "user.kalowsky", 3000)) {
echo "クォータの設定に失敗\n";
return;
}
imap_close($mbox);
?>
注意
この関数は、現在は c-client2000 以降のライブラリのユーザのみ使用可能です。
メール管理者のアカウントでオープンされている imap_stream を必要とします。 他のユーザでオープンされている場合は、この関数は動作しません。
参考
| imap_open() |
| imap_get_quota() |
imap_set_quota
lars at kneschke dot de
19-Mar-2003 11:24
19-Mar-2003 11:24