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

search for in the

imap_fetch_overview> <imap_errors
[edit] Last updated: Fri, 17 May 2013

view this page in

imap_expunge

(PHP 4, PHP 5)

imap_expunge削除用にマークされたすべてのメッセージを削除する

説明

bool imap_expunge ( resource $imap_stream )

imap_delete()imap_mail_move()、 あるいは imap_setflag_full() で削除用マークを設定されたすべてのメッセージを削除します。

パラメータ

imap_stream

imap_open() が返す IMAP ストリーム。

返り値

TRUE を返します。



add a note add a note User Contributed Notes imap_expunge - [1 notes]
up
1
boswachter at xs4all dot nl
7 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.

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