PHP 5.4.33 Released

imap_expunge

(PHP 4, PHP 5)

imap_expungeBorra todos los mensajes marcados para eliminación

Descripción

bool imap_expunge ( resource $imap_stream )

Borra todos los mensajes marcados para eliminación por imap_delete(), imap_mail_move(), o imap_setflag_full().

Parámetros

imap_stream

IMAP stream devuelto por imap_open().

Valores devueltos

Devuelve TRUE.

add a note add a note

User Contributed Notes 1 note

up
6
boswachter at xs4all dot nl
8 years ago
@eisbrenner at gidn dot de

You shouldn't call imap_expunge until before closing the connection. imap_delete tags a message for deletion, imap_expunge deletes all tagged messages. i.e.:
for ($i = 0; $i < $num; $i++) {
  imap_delete($box, $i);
}
imap_expunge($box);

imap_expunge should not be in your inner loop.
To Top