PHP.nl

imap_reopen

imap_reopen

Reopen IMAP stream to new mailbox

bool **imap_reopen** IMAP\Connection $imap string $mailbox int $flags int $retries

Reopens the specified stream to a new on an or server. mailbox

mailbox The mailbox name, see for more information imap_open

flags The are a bit mask with one or more of the following:

  `flags`- - Open mailbox read-only          `OP_READONLY`
    • Don't use or update a for news ( only) OP_ANONYMOUS
    • For and names, open a connection but don't open a mailbox. OP_HALFOPEN
    • Silently expunge recycle stream OP_EXPUNGE
    • Expunge mailbox automatically upon mailbox close (see also and ) CL_EXPUNGE``imap_delete``imap_expunge

retriesNumber of maximum connect attempts

Returns true if the stream is reopened, false otherwise.

Voorbeeld: example

<?php
$mbox = imap_open("{imap.example.org:143}INBOX", "username", "password") or die(implode(", ", imap_errors()));
// ...
imap_reopen($mbox, "{imap.example.org:143}INBOX.Sent") or die(implode(", ", imap_errors()));
// ..
?>