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

search for in the

imap_getacl> <imap_get_quota
[edit] Last updated: Fri, 24 May 2013

view this page in

imap_get_quotaroot

(PHP 4 >= 4.3.0, PHP 5)

imap_get_quotarootObtener la cuota de ajustes por usuario

Descripción

array imap_get_quotaroot ( resource $imap_stream , string $quota_root )

Obtnener la cuota de ajustes por usuario. EL valor límite representa la cantidad total de espacio permitido para este uso de buzón total de usuario. El valor del uso representa la capacidad de buzón total del usuario actual.

Parámetros

imap_stream

IMAP stream devuelto por imap_open().

quota_root

quota_root normalmente debería estar en la forma de su buzón (es decir, INBOX).

Valores devueltos

Devuelve un array de valores concernientes al buzón del usuario especificado. Todos los valores contienen una clave basada en el nombre del recurso, y dentro un array correspondiente al los valores uso y límite.

Esta función devolverá FALSE en el caso de fallo de llamada, y un array de información acerca de la conexión sobre una respuesta no analizable desde el servidor.

Ejemplos

Ejemplo #1 Ejemplo de imap_get_quotaroot()

<?php
$mbox 
imap_open("{imap.example.org}""kalowsky""password"OP_HALFOPEN)
      or die(
"no se puede conectar: " imap_last_error());

$cuota imap_get_quotaroot($mbox"INBOX");
if (
is_array($cuota)) {
   
$almacén $quota_values['STORAGE'];
   echo 
"STORAGE usage level is: " .  $almacén['usage'];
   echo 
"STORAGE limit level is: " .  $almacén['limit'];

   
$mensaje $quota_values['MESSAGE'];
   echo 
"MESSAGE usage level is: " .  $mensaje['usage'];
   echo 
"MESSAGE limit level is: " .  $mensaje['limit'];

   
/* ...  */

}

imap_close($mbox);
?>

Notas

Esta función actualmente sólo está disponible para usuarios de la biblioteca c-client2000 o superior.

imap_stream debería ser abierto como el usuario cuyo buzón se desea comprobar.

Ver también



imap_getacl> <imap_get_quota
[edit] Last updated: Fri, 24 May 2013
 
add a note add a note User Contributed Notes imap_get_quotaroot - [3 notes]
up
0
uphonesimon at gmail dot com
7 years ago
just to make a note for all the people that are wondering the differences between $quota['STORAGE'] and $quot['MESSAGE']
the $quot['STORAGE'] is the size of the mailbox in KB
but $quota['MESSAGE'] is actually the number of messages stored in the mailbox and the up limit of the total messages allowed
up
0
rodrigo dot tsuru at tsuru dot net
8 years ago
The example above isn't right. Replace with this:

<?php
$mbox
= imap_open("{your.imap.host}", "kalowsky", "password", OP_HALFOPEN)
     or die(
"can't connect: " . imap_last_error());
 
$quota = imap_get_quotaroot($mbox, "INBOX");
if (
is_array($quota)) {
  
$storage = $quota['STORAGE'];
   echo
"STORAGE usage level is: " $storage['usage'];
   echo
"STORAGE limit level is: " $storage['limit'];

  
$message = $quota['MESSAGE'];
   echo
"MESSAGE usage level is: " $message['usage'];
   echo
"MESSAGE usage level is: " $message['limit'];

  
/* ...  */

}
 
imap_close($mbox);
?>
up
0
thomas dot hebinck at digionline dot de
9 years ago
['STORAGE']['usage'] and ['STORAGE']['limit'] are values in KB (1024 Bytes)

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