PHP IMAP, POP3 and NNTP Functions

EditRocket provides the following information on IMAP, POP3 and NNTP functions in the PHP source code builder.

string imap_8bit ( string $string ) -

array imap_alerts ( void ) - Returns all of the IMAP alert messages generated since the last imap_alerts() call, or the beginning of the page.

bool imap_append ( resource $imap_stream , string $mailbox , string $message [, string $options ] ) - Appends a string message to the specified mailbox.

string imap_base64 ( string $text ) - Decodes the given BASE-64 encoded text.

string imap_binary ( string $string ) -

string imap_body ( resource $imap_stream , int $msg_number [, int $options ] ) - imap_body() returns the body of the message, numbered msg_number in the current mailbox.

object imap_bodystruct ( resource $imap_stream , int $msg_number , string $section ) - Read the structure of a specified body section of a specific message.

object imap_check ( resource $imap_stream ) - Checks information about the current mailbox.

bool imap_clearflag_full ( resource $imap_stream , string $sequence , string $flag [, string $options ] ) - This function causes a store to delete the specified flag to the flags set for the messages in the specified sequence.

bool imap_close ( resource $imap_stream [, int $flag ] ) - Closes the imap stream.

bool imap_createmailbox ( resource $imap_stream , string $mailbox ) - Creates a new mailbox specified by mailbox.

bool imap_delete ( int $imap_stream , int $msg_number [, int $options ] ) - Marks messages listed in msg_number for deletion.

bool imap_deletemailbox ( resource $imap_stream , string $mailbox ) - Deletes the specified mailbox.

array imap_errors ( void ) - Gets all of the IMAP errors (if any) that have occurred during this page request or since the error stack was reset.

bool imap_expunge ( resource $imap_stream ) -

array imap_fetch_overview ( resource $imap_stream , string $sequence [, int $options ] ) - This function fetches mail headers for the given sequence and returns an overview of their contents.

string imap_fetchbody ( resource $imap_stream , int $msg_number , string $part_number [, int $options ] ) - Fetch of a particular section of the body of the specified messages. Body parts are not decoded by this function.

string imap_fetchheader ( resource $imap_stream , int $msg_number [, int $options ] ) -

object imap_fetchstructure ( resource $imap_stream , int $msg_number [, int $options ] ) - Fetches all the structured information for a given message.

array imap_get_quota ( resource $imap_stream , string $quota_root ) - Retrieve the quota level settings, and usage statics per mailbox.

array imap_get_quotaroot ( resource $imap_stream , string $quota_root ) - Retrieve the quota settings per user. The limit value represents the total amount of space allowed for this user's total mailbox usage. The usage value represents the user's current total mailbox capacity.

array imap_getacl ( resource $imap_stream , string $mailbox ) -

array imap_getmailboxes ( resource $imap_stream , string $ref , string $pattern ) - Gets information on the mailboxes.

array imap_getsubscribed ( resource $imap_stream , string $ref , string $pattern ) - Gets information on the subscribeds mailboxes.

-

object imap_headerinfo ( resource $imap_stream , int $msg_number [, int $fromlength [, int $subjectlength [, string $defaulthost ]]] ) - Gets information about the given message number by reading its headers.

array imap_headers ( resource $imap_stream ) - Returns headers for all messages in a mailbox.

string imap_last_error ( void ) - Gets the full text of the last IMAP error message that occurred on the current page. The error stack is untouched; calling imap_last_error() subsequently, with no intervening errors, will return the same error.

array imap_list ( resource $imap_stream , string $ref , string $pattern ) - Read the list of mailboxes.

-

array imap_listscan ( resource $imap_stream , string $ref , string $pattern , string $content ) - Returns an array containing the names of the mailboxes that have content in the text of the mailbox.

-

array imap_lsub ( resource $imap_stream , string $ref , string $pattern ) - Gets an array of all the mailboxes that you have subscribed.

bool imap_mail ( string $to , string $subject , string $message [, string $additional_headers [, string $cc [, string $bcc [, string $rpath ]]]] ) - This function allows sending of emails with correct handling of Cc and Bcc receivers.

string imap_mail_compose ( array $envelope , array $body ) - Create a MIME message based on the given envelope and body sections.

bool imap_mail_copy ( resource $imap_stream , string $msglist , string $mailbox [, int $options ] ) - Copies mail messages specified by msglist to specified mailbox.

bool imap_mail_move ( resource $imap_stream , string $msglist , string $mailbox [, int $options ] ) - Moves mail messages specified by msglist to the specified mailbox.

object imap_mailboxmsginfo ( resource $imap_stream ) - Checks the current mailbox status on the server.

array imap_mime_header_decode ( string $text ) -

int imap_msgno ( resource $imap_stream , int $uid ) - Returns the message sequence number for the given uid.

int imap_num_msg ( resource $imap_stream ) - Gets the number of messages in the current mailbox.

int imap_num_recent ( resource $imap_stream ) - Gets the number of recent messages in the current mailbox.

resource imap_open ( string $mailbox , string $username , string $password [, int $options [, int $n_retries ]] ) - Opens an IMAP stream to a mailbox.

bool imap_ping ( resource $imap_stream ) - imap_ping() pings the stream to see if it's still active. It may discover new mail; this is the preferred method for a periodic new mail check as well as a keep alive for servers which have inactivity timeout.

string imap_qprint ( string $string ) -

bool imap_renamemailbox ( resource $imap_stream , string $old_mbox , string $new_mbox ) -

bool imap_reopen ( resource $imap_stream , string $mailbox [, int $options [, int $n_retries ]] ) - Reopens the specified stream to a new mailbox on an IMAP or NNTP server.

array imap_rfc822_parse_adrlist ( string $address , string $default_host ) -

object imap_rfc822_parse_headers ( string $headers [, string $defaulthost ] ) -

string imap_rfc822_write_address ( string $mailbox , string $host , string $personal ) -

bool imap_savebody ( resource $imap_stream , mixed $file , int $msg_number [, string $part_number [, int $options ]] ) - Saves a part or the whole body of the specified message.

-

array imap_search ( resource $imap_stream , string $criteria [, int $options [, string $charset ]] ) - This function performs a search on the mailbox currently opened in the given imap stream.

bool imap_set_quota ( resource $imap_stream , string $quota_root , int $quota_limit ) - Sets an upper limit quota on a per mailbox basis.

-

bool imap_setflag_full ( resource $imap_stream , string $sequence , string $flag [, int $options ] ) - Causes a store to add the specified flag to the flags set for the messages in the specified sequence.

array imap_sort ( resource $imap_stream , int $criteria , int $reverse [, int $options [, string $search_criteria [, string $charset ]]] ) - Gets and sorts message numbers by the given parameters.

object imap_status ( resource $imap_stream , string $mailbox , int $options ) - Gets status information about the given mailbox.

bool imap_subscribe ( resource $imap_stream , string $mailbox ) - Subscribe to a new mailbox.

array imap_thread ( resource $imap_stream [, int $options ] ) - Gets a tree of a threaded message.

mixed imap_timeout ( int $timeout_type [, int $timeout ] ) -

int imap_uid ( resource $imap_stream , int $msg_number ) - This function returns the UID for the given message sequence number. An UID is a unique identifier that will not change over time while a message sequence number may change whenever the content of the mailbox changes.

bool imap_undelete ( resource $imap_stream , int $msg_number [, int $flags ] ) -

bool imap_unsubscribe ( string $imap_stream , string $mailbox ) - Unsubscribe from the specified mailbox.

string imap_utf7_decode ( string $text ) - Decodes modified UTF-7 text into ISO-8859-1 string.

string imap_utf7_encode ( string $data ) - Converts data to modified UTF-7 text.

string imap_utf8 ( string $mime_encoded_text ) - Converts the given mime_encoded_text to UTF-8.