}
}
+/**
+ * @param mixed $new_query
+ * @param string $tag
+ * @param array $aQuery
+ * @param boolean $unique_id
+ * @since 1.5.0
+ */
function sqimap_prepare_pipelined_query($new_query,&$tag,&$aQuery,$unique_id) {
$sid = sqimap_session_id($unique_id);
$tag_uid_a = explode(' ',trim($sid));
$aQuery[$tag] = $query;
}
+/**
+ * @param stream $imap_stream
+ * @param array $aQueryList
+ * @param boolean $handle_errors
+ * @param array $aServerResponse
+ * @param array $aServerMessage
+ * @param boolean $unique_id
+ * @param mixed $filter see sqimap_retrieve_imap_response()
+ * @param mixed $outputstream see sqimap_retrieve_imap_response()
+ * @param mixed $no_return see sqimap_retrieve_imap_response()
+ * @since 1.5.0
+ */
function sqimap_run_pipelined_command ($imap_stream, $aQueryList, $handle_errors,
&$aServerResponse, &$aServerMessage, $unique_id = false,
$filter=false,$outputstream=false,$no_return=false) {
* no matter how big it may be.
* @param stream imap_stream the stream to read from
* @return string a line
+ * @since 1.2.8
*/
function sqimap_fgets($imap_stream) {
$read = '';
return $results;
}
+/**
+ * @param stream $imap_stream
+ * @param integer $iSize
+ * @param mixed $filter see sqimap_retrieve_imap_response()
+ * @param mixed $outputstream see sqimap_retrieve_imap_response()
+ * @param mixed $no_return see sqimap_retrieve_imap_response()
+ * @return string
+ * @since 1.4.1
+ */
function sqimap_fread($imap_stream,$iSize,$filter=false,
$outputstream=false, $no_return=false) {
if (!$filter || !$outputstream) {
* @param string message optional error message
* @param string $link an optional link to try again
* @return void
+ * @since 1.5.0
*/
function sqimap_error_box($title, $query = '', $message_title = '', $message = '', $link = '')
{
* 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.
+ * @param stream $imap_stream
+ * @param mixed $tag
+ * @param boolean $handle_errors
+ * @param array $response
+ * @param array $message
+ * @param mixed $query
+ * @param mixed $filter
+ * @param mixed $outputstream
+ * @param mixed $no_return
+ * @since 1.5.0
*/
function sqimap_retrieve_imap_response($imap_stream, $tag, $handle_errors,
&$response, &$message, $query = '',
}
}
+/**
+ * @param stream $imap_stream
+ * @param string $tag_uid
+ * @param boolean $handle_errors
+ * @param array $response
+ * @param array $message
+ * @param mixed $query (since 1.2.5)
+ * @param mixed $filter (since 1.4.1) see sqimap_retrieve_imap_response()
+ * @param mixed $outputstream (since 1.4.1) see sqimap_retrieve_imap_response()
+ * @param mixed $no_return (since 1.4.1) see sqimap_retrieve_imap_response()
+ */
function sqimap_read_data ($imap_stream, $tag_uid, $handle_errors,
&$response, &$message, $query = '',
$filter=false,$outputstream=false,$no_return=false) {
* @param int port port number to connect to
* @param bool tls whether to use TLS when connecting.
* @return imap-stream resource identifier
+ * @since 1.5.0 (usable only in 1.5.1 or later)
*/
function sqimap_create_stream($server,$port,$tls=false) {
global $squirrelmail_language;
/**
* Logs the user into the imap server. If $hide is set, no error messages
* will be displayed. This function returns the imap connection handle.
+ * @param string $username user name
+ * @param string $password encrypted password
+ * @param string $imap_server_address address of imap server
+ * @param integer $imap_port port of imap server
+ * @param boolean $hide controls display connection errors
+ * @return stream
*/
function sqimap_login ($username, $password, $imap_server_address, $imap_port, $hide) {
global $color, $squirrelmail_language, $onetimepad, $use_imap_tls,
* Retreive the CAPABILITY string from the IMAP server.
* If capability is set, returns only that specific capability,
* else returns array of all capabilities.
+ * @param $imap_stream
+ * @param string $capability (optional since 1.3.0)
+ * @return mixed (string if $capability is set and found,
+ * false, if $capability is set and not found,
+ * array if $capability not set)
*/
function sqimap_capability($imap_stream, $capability='') {
global $sqimap_capabilities;
/**
* Returns the delimeter between mailboxes: INBOX/Test, or INBOX.Test
+ * @param stream $imap_stream
+ * @return string
*/
function sqimap_get_delimiter ($imap_stream = false) {
global $sqimap_delimiter, $optional_delimiter;
* This encodes a mailbox name for use in IMAP commands.
* @param string what the mailbox to encode
* @return string the encoded mailbox string
+ * @since 1.5.0
*/
function sqimap_encode_mailbox_name($what)
{