Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

imap_reopen(3) [php man page]

IMAP_REOPEN(3)								 1							    IMAP_REOPEN(3)

imap_reopen - ReopenIMAPstream to new mailbox

SYNOPSIS
bool imap_reopen (resource $imap_stream, string $mailbox, [int $options], [int $n_retries]) DESCRIPTION
Reopens the specified stream to a new $mailbox on an IMAP or NNTP server. PARAMETERS
o $ imap_stream -An IMAP stream returned by imap_open(3). o $mailbox - The mailbox name, see imap_open(3) for more information o $options - The $options are a bit mask with one or more of the following: o OP_READONLY - Open mailbox read-only o OP_ANONYMOUS - Don't use or update a .newsrc for news (NNTP only) o OP_HALFOPEN - For IMAP and NNTP names, open a connection but don't open a mailbox. o OP_EXPUNGE - Silently expunge recycle stream o CL_EXPUNGE - Expunge mailbox automatically upon mailbox close (see also imap_delete(3) and imap_expunge(3)) o $n_retries - Number of maximum connect attempts RETURN VALUES
Returns TRUE if the stream is reopened, FALSE otherwise. CHANGELOG
+--------+------------------+ |Version | | | | | | | Description | | | | +--------+------------------+ | 5.2.0 | | | | | | | $n_retries added | | | | +--------+------------------+ EXAMPLES
Example #1 imap_reopen(3) 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())); // .. ?> PHP Documentation Group IMAP_REOPEN(3)

Check Out this Related Man Page

IMAP_STATUS(3)								 1							    IMAP_STATUS(3)

imap_status - Returns status information on a mailbox

SYNOPSIS
object imap_status (resource $imap_stream, string $mailbox, int $options) DESCRIPTION
Gets status information about the given $mailbox. PARAMETERS
o $ imap_stream -An IMAP stream returned by imap_open(3). o $mailbox - The mailbox name, see imap_open(3) for more information o $options - Valid flags are: o SA_MESSAGES - set $status->messages to the number of messages in the mailbox o SA_RECENT - set $status->recent to the number of recent messages in the mailbox o SA_UNSEEN - set $status->unseen to the number of unseen (new) messages in the mailbox o SA_UIDNEXT - set $status->uidnext to the next uid to be used in the mailbox o SA_UIDVALIDITY - set $status->uidvalidity to a constant that changes when uids for the mailbox may no longer be valid o SA_ALL - set all of the above RETURN VALUES
This function returns an object containing status information. The object has the following properties: messages, recent, unseen, uidnext, and uidvalidity. flags is also set, which contains a bitmask which can be checked against any of the above constants. EXAMPLES
Example #1 imap_status(3) example <?php $mbox = imap_open("{imap.example.com}", "username", "password", OP_HALFOPEN) or die("can't connect: " . imap_last_error()); $status = imap_status($mbox, "{imap.example.org}INBOX", SA_ALL); if ($status) { echo "Messages: " . $status->messages . "<br /> "; echo "Recent: " . $status->recent . "<br /> "; echo "Unseen: " . $status->unseen . "<br /> "; echo "UIDnext: " . $status->uidnext . "<br /> "; echo "UIDvalidity:" . $status->uidvalidity . "<br /> "; } else { echo "imap_status failed: " . imap_last_error() . " "; } imap_close($mbox); ?> PHP Documentation Group IMAP_STATUS(3)
Man Page