downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

imap_setacl> <imap_search
[edit] Last updated: Fri, 17 May 2013

view this page in

imap_set_quota

(PHP 4 >= 4.0.5, PHP 5)

imap_set_quotaSetzt die Mengenbeschrenkung für ein Postfach

Beschreibung

bool imap_set_quota ( resource $imap_stream , string $quota_root , int $quota_limit )

Sets an upper limit quota on a per mailbox basis.

Parameter-Liste

imap_stream

Eine von imap_open() zurückgegebene IMAP-Verbindung.

quota_root

Das Postfach für das eine Mengenbeschrenkung festgelegt werden soll. Dieses sollte dem IMAP-Standard für Postfächer folgen: user.name.

quota_limit

Maximale Größe des Postfachs quota_root in KB.

Rückgabewerte

Gibt bei Erfolg TRUE zurück. Im Fehlerfall wird FALSE zurückgegeben.

Beispiele

Beispiel #1 imap_set_quota() Beispiel

<?php
$mbox 
imap_open("{imap.example.org:143}""mailadmin""password");

if (!
imap_set_quota($mbox"user.kalowsky"3000)) {
    echo 
"Error in setting quota\n";
    return;
}

imap_close($mbox);
?>

Anmerkungen

Diese Funktion ist nur ab der Bibliotheksversion c-client2000 verfügbar

Die Serververbindung imap_stream muss von einem Benutzer mit Administratorrechten geöffnet worden sein, ansonsten schlägt die Funktion fehl.

Siehe auch

  • imap_open() - Öffnet eine Verbindung zu einem Mailserver-Postfach
  • imap_get_quota() - Liefert Quota-Beschränkungen und Nutzungsstatistik der Postfächer



add a note add a note User Contributed Notes imap_set_quota - [1 notes]
up
0
lars at kneschke dot de
10 years ago
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);

 
show source | credits | sitemap | contact | advertising | mirror sites