/functions/imap_general.php

Description

imap_general.php

This implements all functions that do general IMAP functions.

Includes
require_once (SM_PATH.'functions/auth.php') (line 17)
require_once (SM_PATH.'functions/page_header.php') (line 16)

Includes..

Functions
map_yp_alias (line 1127)

This is an example that gets IMAP servers from yellowpages (NIS).

you can simple put map:map_yp_alias in your $imap_server_address in config.php use your own function instead map_yp_alias to map your LDAP whatever way to find the users IMAP server.

void map_yp_alias ( $username)
  • $username
parseAddress (line 868)

Parses an address string.

  • return: An array with one sub-array for each address found in the given string. Each sub-array contains two (?) entries, the first containing the actual email address, the second containing any personal information that was in the address string
array parseAddress (string $address, [int $max = 0])
  • string $address: Generic email address(es) in any format, including possible personal information as well as the actual address (such as "Jose" <jose@example.org> or "Jose" <jose@example.org>, "Keiko" <keiko@example.org>)
  • int $max: The most email addresses to parse out of the given string
sqimap_append (line 1068)

Saves a message to a given folder -- used for saving sent messages

void sqimap_append ( $imap_stream,  $sent_folder,  $length)
  • $imap_stream
  • $sent_folder
  • $length
sqimap_append_checkresponse (line 1080)
void sqimap_append_checkresponse ( $response,  $folder)
  • $response
  • $folder
sqimap_append_done (line 1074)
void sqimap_append_done ( $imap_stream, [ $folder = ''])
  • $imap_stream
  • $folder
sqimap_capability (line 764)

Retreive the CAPABILITY string from the IMAP server.

If capability is set, returns only that specific capability, else returns array of all capabilities.

void sqimap_capability ( $imap_stream, [ $capability = ''])
  • $imap_stream
  • $capability
sqimap_fgets (line 123)

Custom fgets function: gets a line from the IMAP server, no matter how big it may be.

  • return: a line
string sqimap_fgets (stream $imap_stream)
  • stream $imap_stream: imap_stream the stream to read from
sqimap_fread (line 143)
void sqimap_fread ( $imap_stream,  $iSize, [ $filter = false], [ $outputstream = false], [ $no_return = false])
  • $imap_stream
  • $iSize
  • $filter
  • $outputstream
  • $no_return
sqimap_get_delimiter (line 794)

Returns the delimeter between mailboxes: INBOX/Test, or INBOX.Test

void sqimap_get_delimiter ([ $imap_stream = false])
  • $imap_stream
sqimap_get_num_messages (line 841)

Gets the number of messages in the current mailbox.

void sqimap_get_num_messages ( $imap_stream,  $mailbox)
  • $imap_stream
  • $mailbox
sqimap_get_user_server (line 1113)
void sqimap_get_user_server ( $imap_server,  $username)
  • $imap_server
  • $username
sqimap_login (line 494)

Logs the user into the IMAP server. If $hide is set, no error messages will be displayed. This function returns the IMAP connection handle.

void sqimap_login ( $username,  $password,  $imap_server_address,  $imap_port,  $hide, [ $stream_options = array()])
  • $username
  • $password
  • $imap_server_address
  • $imap_port
  • $hide
  • $stream_options
sqimap_logout (line 752)

Simply logs out the IMAP session

void sqimap_logout (stream $imap_stream)
  • stream $imap_stream: imap_stream the IMAP connection to log out.
sqimap_read_data (line 466)
void sqimap_read_data ( $imap_stream,  $tag_uid,  $handle_errors,  &$response,  &$message, [ $query = ''], [ $filter = false], [ $outputstream = false], [ $no_return = false])
  • $imap_stream
  • $tag_uid
  • $handle_errors
  • &$response
  • &$message
  • $query
  • $filter
  • $outputstream
  • $no_return
sqimap_read_data_list (line 201)

Reads the output from the IMAP stream. If handle_errors is set to true, this will also handle all errors that are received. If it is not set, the errors will be sent back through $response and $message.

void sqimap_read_data_list ( $imap_stream,  $tag_uid,  $handle_errors,  &$response,  &$message, [ $query = ''], [ $filter = false], [ $outputstream = false], [ $no_return = false])
  • $imap_stream
  • $tag_uid
  • $handle_errors
  • &$response
  • &$message
  • $query
  • $filter
  • $outputstream
  • $no_return
sqimap_run_command (line 58)
void sqimap_run_command ( $imap_stream,  $query,  $handle_errors,  &$response,  &$message, [ $unique_id = false], [ $filter = false], [ $outputstream = false], [ $no_return = false])
  • $imap_stream
  • $query
  • $handle_errors
  • &$response
  • &$message
  • $unique_id
  • $filter
  • $outputstream
  • $no_return
sqimap_run_command_list (line 40)

Both send a command and accept the result from the command.

This is to allow proper session number handling.

void sqimap_run_command_list ( $imap_stream,  $query,  $handle_errors,  &$response,  &$message, [ $unique_id = false])
  • $imap_stream
  • $query
  • $handle_errors
  • &$response
  • &$message
  • $unique_id
sqimap_run_literal_command (line 79)
void sqimap_run_literal_command ( $imap_stream,  $query,  $handle_errors,  &$response,  &$message, [ $unique_id = false])
  • $imap_stream
  • $query
  • $handle_errors
  • &$response
  • &$message
  • $unique_id
sqimap_session_id (line 26)

Generates a new session ID by incrementing the last one used; this ensures that each command has a unique ID.

  • return: IMAP session id of the form 'A000'.
string sqimap_session_id ([bool $unique_id = FALSE])
  • bool $unique_id: unique_id
sqimap_status_messages (line 1044)

Returns the number of unseen/total messages in this folder

void sqimap_status_messages ( $imap_stream,  $mailbox)
  • $imap_stream
  • $mailbox
sqimap_unseen_messages (line 1028)

Returns the number of unseen messages in this folder.

void sqimap_unseen_messages ( $imap_stream,  $mailbox)
  • $imap_stream
  • $mailbox

Documentation generated on Sat, 25 Oct 2014 04:21:02 +0200 by phpDocumentor 1.4.3