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_APPEND(3)								 1							    IMAP_APPEND(3)

imap_append - Append a string message to a specified mailbox

SYNOPSIS
bool imap_append NULL NULL (resource $imap_stream, string $mailbox, string $message, [string $options], [string $internal_date]) DESCRIPTION
Appends a string $message to the specified $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 $message - The message to be append, as a string When talking to the Cyrus IMAP server, you must use " " as your end-of-line terminator instead of " " or the operation will fail o $options - If provided, the $options will also be written to the $mailbox o $internal_date - If this parameter is set, it will set the INTERNALDATE on the appended message. The parameter should be a date string that con- forms to the rfc2060 specifications for a date_time value. RETURN VALUES
Returns TRUE on success or FALSE on failure. CHANGELOG
+--------+---------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------+ | 5.3.2 | | | | | | | Added INTERNALDATE support to imap_append. | | | | +--------+---------------------------------------------+ EXAMPLES
Example #1 imap_append(3) example <?php $stream = imap_open("{imap.example.org}INBOX.Drafts", "username", "password"); $check = imap_check($stream); echo "Msg Count before append: ". $check->Nmsgs . " "; imap_append($stream, "{imap.example.org}INBOX.Drafts" , "From: me@example.com " . "To: you@example.com " . "Subject: test " . " " . "this is a test message, please ignore " ); $check = imap_check($stream); echo "Msg Count after append : ". $check->Nmsgs . " "; imap_close($stream); ?> PHP Documentation Group IMAP_APPEND(3)
Man Page