PHP 7.1.0 Alpha 2 Released

imap_expunge

(PHP 4, PHP 5, PHP 7)

imap_expungeSilindi imli tüm iletileri gerçekten siler

Açıklama

bool imap_expunge ( resource $imap_akımı )

imap_delete(), imap_mail_move() veya imap_setflag_full() tarafından 'silindi' olarak imlenmiş tüm iletileri siler.

Değiştirgeler

imap_akımı

imap_open() işlevinden dönen bir IMAP akımı.

Dönen Değerler

TRUE döner.

add a note add a note

User Contributed Notes 2 notes

up
10
boswachter at xs4all dot nl
10 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.
up
1
Pavel Cernik
2 months ago
imap_expunge() may change order of messages which were loaded using imap_sort().
That means, if you use foreach() on result of imap_sort() function and each pass you move/delete a message and instantly expunge them, next cycle, messages will have different numbers than imap_sort() returned and the script will fail.
To Top