//
if ($reply_id) {
global $imapConnection, $username, $imapServerAddress,
- $imapPort, $imapSslOptions, $mailbox;
+ $imapPort, $imap_stream_options, $mailbox;
// try our best to use an existing IMAP handle
//
} else {
$close_imap_stream = TRUE;
$my_imap_stream = sqimap_login($username, FALSE, $imapServerAddress,
- $imapPort, 0, $imapSslOptions);
+ $imapPort, 0, $imap_stream_options);
}
sqimap_mailbox_select($my_imap_stream, $mailbox);
* @param string $pass password to log into the SMTP server with
* @param boolean $authpop whether or not to use POP-before-SMTP authorization
* @param string $pop_host host name or IP to connect to for POP-before-SMTP authorization
- * @param array $ssl_options SSL context options, see config_local.php for more details (OPTIONAL)
+ * @param array $stream_options SSL context options, see config_local.example.php for more details (OPTIONAL)
*
* @return handle $stream file handle resource to SMTP stream
*/
- function initStream($message, $domain, $length=0, $host='', $port='', $user='', $pass='', $authpop=false, $pop_host='', $ssl_options=array()) {
+ function initStream($message, $domain, $length=0, $host='', $port='', $user='', $pass='', $authpop=false, $pop_host='', $stream_options=array()) {
return $stream;
}
}
}
- function initStream($message, $domain, $length=0, $host='', $port='', $user='', $pass='', $authpop=false, $pop_host='', $ssl_options=array()) {
+ function initStream($message, $domain, $length=0, $host='', $port='', $user='', $pass='', $authpop=false, $pop_host='', $stream_options=array()) {
global $use_smtp_tls,$smtp_auth_mech;
if ($authpop) {
if ((check_php_version(4,3)) && (extension_loaded('openssl'))) {
if (function_exists('stream_socket_client')) {
$server_address = 'ssl://' . $host . ':' . $port;
- $ssl_context = @stream_context_create($ssl_options);
+ $ssl_context = @stream_context_create($stream_options);
$connect_timeout = ini_get('default_socket_timeout');
// null timeout is broken
if ($connect_timeout == 0)
*
* @param Message $message Message object containing the from address
* @param string $sendmail_path Location of sendmail binary
- * @param mixed $ignore Seven extra arguments that the parent class
+ * @param mixed $ignore Eight extra arguments that the parent class
* requires which are not used here
* @return resource
* @access public
* (those that are displayed in a different color than other
* "normal" mailboxes).
*
- * $smtpSslOptions allows more control over the SSL context used
- * when connecting to the SMTP server over SSL/TLS. See:
+ * $smtp_stream_options allows more control over the SSL context
+ * used when connecting to the SMTP server over SSL/TLS. See:
* http://www.php.net/manual/context.php and in particular
* http://php.net/manual/context.ssl.php
* For example, you can specify a CA file that corresponds
* to your server's certificate and make sure that the
* server's certificate is validated when connecting:
- * $smtpSslOptions = array(
+ * $smtp_stream_options = array(
* 'ssl' => array(
* 'cafile' => '/etc/pki/tls/certs/ca-bundle.crt',
* 'verify_peer' => true,
* ),
* );
*
- * $imapSslOptions allows more control over the SSL context used
- * when connecting to the IMAP server over SSL/TLS. See:
- * http://www.php.net/manual/context.php and in particular
- * http://php.net/manual/context.ssl.php
+ * $imap_stream_options allows more control over the SSL
+ * context used when connecting to the IMAP server over
+ * SSL/TLS. See: http://www.php.net/manual/context.php
+ * and in particular http://php.net/manual/context.ssl.php
* For example, you can specify a CA file that corresponds
* to your server's certificate and make sure that the
* server's certificate is validated when connecting:
- * $imapSslOptions = array(
+ * $imap_stream_options = array(
* 'ssl' => array(
* 'cafile' => '/etc/pki/tls/certs/ca-bundle.crt',
* 'verify_peer' => true,
shown on the message list screen
- Added advanced control over the SSL context used when connecting
to the SMTP and IMAP servers over SSL/TLS (thanks to Emmanuel
- Dreyfus). See $imapSslOptions and $smtpSslOptions in
+ Dreyfus). See $imap_stream_options and $smtp_stream_options in
config_local.example.php for more information.
- Added ability to show login error from the IMAP server instead of
traditional "Unknown user or password incorrect" (thanks to Alain
* @param int port port number to connect to
* @param integer $tls whether to use plain text(0), TLS(1) or STARTTLS(2) when connecting.
* Argument was boolean before 1.5.1.
- * @param array $ssl_options SSL context options, see config_local.php
+ * @param array $stream_options Stream context options, see config_local.php
* for more details (OPTIONAL)
* @return imap-stream resource identifier
* @since 1.5.0 (usable only in 1.5.1 or later)
*/
-function sqimap_create_stream($server,$port,$tls=0,$ssl_options=array()) {
+function sqimap_create_stream($server,$port,$tls=0,$stream_options=array()) {
global $squirrelmail_language;
if (strstr($server,':') && ! preg_match("/^\[.*\]$/",$server)) {
if ((check_php_version(4,3)) and (extension_loaded('openssl'))) {
if (function_exists('stream_socket_client')) {
$server_address = 'ssl://' . $server . ':' . $port;
- $ssl_context = @stream_context_create($ssl_options);
+ $ssl_context = @stream_context_create($stream_options);
$connect_timeout = ini_get('default_socket_timeout');
// null timeout is broken
if ($connect_timeout == 0)
* 1 = show no errors (just exit)
* 2 = show no errors (return FALSE)
* 3 = show no errors (return error string)
- * @param array $ssl_options SSL context options, see config_local.php
+ * @param array $stream_options Stream context options, see config_local.php
* for more details (OPTIONAL)
* @return mixed The IMAP connection stream, or if the connection fails,
* FALSE if $hide is set to 2 or an error string if $hide
* is set to 3.
*/
function sqimap_login ($username, $password, $imap_server_address,
- $imap_port, $hide, $ssl_options=array()) {
+ $imap_port, $hide, $stream_options=array()) {
global $color, $squirrelmail_language, $onetimepad, $use_imap_tls,
$imap_auth_mech, $sqimap_capabilities, $display_imap_login_error;
$host = $imap_server_address;
$imap_server_address = sqimap_get_user_server($imap_server_address, $username);
- $imap_stream = sqimap_create_stream($imap_server_address,$imap_port,$use_imap_tls,$ssl_options);
+ $imap_stream = sqimap_create_stream($imap_server_address,$imap_port,$use_imap_tls,$stream_options);
if (($imap_auth_mech == 'cram-md5') OR ($imap_auth_mech == 'digest-md5')) {
// We're using some sort of authentication OTHER than plain or login
* @return array all option information
*/
function load_optpage_data_folder() {
- global $username, $imapServerAddress, $imapPort, $imapSslOptions,
+ global $username, $imapServerAddress, $imapPort, $imap_stream_options,
$oTemplate, $nbsp, $folder_prefix, $default_folder_prefix,
$show_prefix_option;
/* Get some imap data we need later. */
- $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions);
+ $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options);
$boxes = sqimap_mailbox_list($imapConnection);
/* Build a simple array into which we will build options. */
* @access private
*/
function start_filters($hook_args) {
- global $imapServerAddress, $imapPort, $imapSslOptions, $imap_stream,
+ global $imapServerAddress, $imapPort, $imap_stream_options, $imap_stream,
$imapConnection, $UseSeparateImapConnection, $AllowSpamFilters,
$filter_inbox_count, $username;
if ((!isset($imap_stream) && !isset($imapConnection)) ||
$UseSeparateImapConnection ) {
$stream = sqimap_login($username, false, $imapServerAddress,
- $imapPort, 10, $imapSslOptions);
+ $imapPort, 10, $imap_stream_options);
$previously_connected = false;
} else if (isset($imapConnection)) {
$stream = $imapConnection;
sqgetGlobalVar('theid', $theid);
sqgetGlobalVar('action', $action, SQ_GET);
-global $imapSslOptions; // in case not defined in config
+global $imap_stream_options; // in case not defined in config
if (sqgetGlobalVar('filter_submit',$filter_submit,SQ_POST)) {
if (isset($action) && ($action == 'add' || $action == 'edit')) {
- $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions);
+ $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options);
$boxes = sqimap_mailbox_list($imapConnection);
for ($a = 0, $cnt = count($boxes); $a < $cnt; $a++) {
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
sqgetGlobalVar('action', $action, SQ_GET);
-global $imapSslOptions; // in case not defined in config
+global $imap_stream_options; // in case not defined in config
/* end globals */
displayPageHeader($color);
if (isset($action) && $action == 'spam') {
- $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions);
+ $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options);
$boxes = sqimap_mailbox_list($imapConnection);
sqimap_logout($imapConnection);
$numboxes = count($boxes);
/* END GLOBALS */
-global $imapSslOptions; // in case not defined in config
-$imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions);
+global $imap_stream_options; // in case not defined in config
+$imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options);
$caps_array = get_caps($imap_stream);
$list = array ('TEST_0',
'TEST_1',
/* globals */
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
-global $imapSslOptions; // in case not defined in config
+global $imap_stream_options; // in case not defined in config
/* end globals */
/**
}
Mail_Fetch_Status(_("Opening IMAP server"));
- $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 10, $imapSslOptions);
+ $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 10, $imap_stream_options);
// check if destination folder is not set, is not subscribed and is not \noselect folder
if($mailfetch_subfolder == '' ||
function mail_fetch_login_function() {
include_once (SM_PATH . 'functions/imap_general.php');
- global $username, $data_dir, $imapServerAddress, $imapPort, $imapSslOptions;
+ global $username, $data_dir, $imapServerAddress, $imapPort, $imap_stream_options;
$mailfetch_newlog = getPref($data_dir, $username, 'mailfetch_newlog');
continue;
}
- $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 10, $imapSslOptions);
+ $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 10, $imap_stream_options);
/* log into pop server*/
if (! $pop3->login($mailfetch_user, $mailfetch_pass)) {
$mf_port = trim($mf_port);
$mf_server = trim($mf_server);
-global $imapSslOptions; // in case not defined in config
+global $imap_stream_options; // in case not defined in config
/* end globals */
html_tag( 'tr' ) .
html_tag( 'th', _("Store in Folder:"), 'right' ) .
html_tag( 'td', '', 'left' );
- $imapConnection = sqimap_login ($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions);
+ $imapConnection = sqimap_login ($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options);
$boxes = sqimap_mailbox_list($imapConnection);
echo '<select name="mf_subfolder">';
html_tag( 'th', _("Store in Folder:"), 'right' ) .
html_tag( 'td', '', 'left' );
- $imapConnection = sqimap_login ($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions);
+ $imapConnection = sqimap_login ($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options);
$boxes = sqimap_mailbox_list($imapConnection);
echo '<select name="mf_subfolder">';
$selected = 0;
* @access public
*/
function get_message_details($mailbox, $passed_id, $passed_ent_id=0, $stripHTML=FALSE) {
- global $imapServerAddress, $imapPort, $imapSslOptions,
+ global $imapServerAddress, $imapPort, $imap_stream_options,
$color,$msgd_8bit_in_hex, $username;
$returnValue = '';
- $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions);
+ $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options);
$read = sqimap_mailbox_select($imapConnection, $mailbox);
if (!empty($passed_ent_id))
$body = sqimap_run_command($imapConnection, "FETCH $passed_id BODY[$passed_ent_id]",true, $response, $readmessage, TRUE);
function sent_subfolders_optpage_loadhook_folders_do() {
global $data_dir, $username, $optpage_data, $imapServerAddress,
- $imapPort, $imapSslOptions, $show_contain_subfolders_option, $sent_folder;
+ $imapPort, $imap_stream_options, $show_contain_subfolders_option, $sent_folder;
/* Get some imap data we need later. */
- $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions);
+ $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options);
$boxes = sqimap_mailbox_list($imapConnection);
sqimap_logout($imapConnection);
function sent_subfolders_update_sentfolder_do() {
global $sent_folder, $username,
$data_dir, $imapServerAddress, $imapPort,
- $imapSslOptions, $move_to_sent;
+ $imap_stream_options, $move_to_sent;
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
/* Auto-create folders, if they do not yet exist. */
if ($sent_subfolder != 'none') {
/* Create the imap connection. */
- $ic = sqimap_login($username, false, $imapServerAddress, $imapPort, 10, $imapSslOptions);
+ $ic = sqimap_login($username, false, $imapServerAddress, $imapPort, 10, $imap_stream_options);
$boxes = false;
/**
*/
function spamcop_while_sending_function() {
global $mailbox, $spamcop_delete, $spamcop_save, $spamcop_is_composing, $auto_expunge,
- $username, $imapServerAddress, $imapPort, $imapSslOptions;
+ $username, $imapServerAddress, $imapPort, $imap_stream_options;
if (sqgetGlobalVar('spamcop_is_composing' , $spamcop_is_composing)) {
// delete spam message
if ($spamcop_delete) {
- $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions);
+ $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options);
sqimap_mailbox_select($imapConnection, $mailbox);
sqimap_msgs_list_delete($imapConnection, $mailbox, array($spamcop_is_composing));
if ($auto_expunge)
exit();
}
- global $imapSslOptions; // in case not defined in config
- $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions);
+ global $imap_stream_options; // in case not defined in config
+ $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options);
sqimap_mailbox_select($imap_stream, $mailbox);
if ($spamcop_method == 'quick_email' ||
require_once(SM_PATH . 'functions/addressbook.php');
require_once(SM_PATH . 'functions/forms.php');
require_once(SM_PATH . 'functions/identity.php');
-global $imapSslOptions; // in case not defined in config
+global $imap_stream_options; // in case not defined in config
/* --------------------- Get globals ------------------------------------- */
$draft_message = _("Draft Email Saved");
/* If this is a resumed draft, then delete the original */
if(isset($delete_draft)) {
- $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, false, $imapSslOptions);
+ $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, false, $imap_stream_options);
sqimap_mailbox_select($imap_stream, $draft_folder);
// force bypass_trash=true because message should be saved when deliverMessage() returns true.
// in current implementation of sqimap_msgs_list_flag() single message id can
/* if it is resumed draft, delete draft message */
if ( isset($delete_draft)) {
- $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, false, $imapSslOptions);
+ $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, false, $imap_stream_options);
sqimap_mailbox_select($imap_stream, $draft_folder);
// bypass_trash=true because message should be saved when deliverMessage() returns true.
// in current implementation of sqimap_msgs_list_flag() single message id can
function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $session='') {
global $editor_size, $default_use_priority, $body, $idents,
$use_signature, $data_dir, $username,
- $key, $imapServerAddress, $imapPort, $imapSslOptions,
+ $key, $imapServerAddress, $imapPort, $imap_stream_options,
$composeMessage, $body_quote, $request_mdn, $request_dr,
$mdn_user_support, $languages, $squirrelmail_language,
$default_charset, $do_not_reply_to_self;
if ($passed_id) {
$imapConnection = sqimap_login($username, false, $imapServerAddress,
- $imapPort, 0, $imapSslOptions);
+ $imapPort, 0, $imap_stream_options);
sqimap_mailbox_select($imapConnection, $mailbox);
$message = sqimap_get_message($imapConnection, $passed_id, $mailbox);
$username, $identity, $idents, $data_dir,
$request_mdn, $request_dr, $default_charset, $useSendmail,
$domain, $action, $default_move_to_sent, $move_to_sent,
- $imapServerAddress, $imapPort, $imapSslOptions, $sent_folder, $key;
+ $imapServerAddress, $imapPort, $imap_stream_options, $sent_folder, $key;
$rfc822_header = $composeMessage->rfc822_header;
if (!$useSendmail && !$draft) {
require_once(SM_PATH . 'class/deliver/Deliver_SMTP.class.php');
$deliver = new Deliver_SMTP();
- global $smtpServerAddress, $smtpPort, $smtpSslOptions, $pop_before_smtp, $pop_before_smtp_host;
+ global $smtpServerAddress, $smtpPort, $smtp_stream_options, $pop_before_smtp, $pop_before_smtp_host;
$authPop = (isset($pop_before_smtp) && $pop_before_smtp) ? true : false;
if (empty($pop_before_smtp_host)) $pop_before_smtp_host = $smtpServerAddress;
get_smtp_user($user, $pass);
$stream = $deliver->initStream($composeMessage,$domain,0,
- $smtpServerAddress, $smtpPort, $user, $pass, $authPop, $pop_before_smtp_host, $smtpSslOptions);
+ $smtpServerAddress, $smtpPort, $user, $pass, $authPop, $pop_before_smtp_host, $smtp_stream_options);
} elseif (!$draft) {
require_once(SM_PATH . 'class/deliver/Deliver_SendMail.class.php');
global $sendmail_path, $sendmail_args;
} elseif ($draft) {
global $draft_folder;
$imap_stream = sqimap_login($username, false, $imapServerAddress,
- $imapPort, 0, $imapSslOptions);
+ $imapPort, 0, $imap_stream_options);
if (sqimap_mailbox_exists ($imap_stream, $draft_folder)) {
require_once(SM_PATH . 'class/deliver/Deliver_IMAP.class.php');
$imap_deliver = new Deliver_IMAP();
plain_error_message($msg);
} else {
unset ($deliver);
- $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions);
+ $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options);
// mark as replied or forwarded if applicable
/* end globals */
-global $imapSslOptions; // in case not defined in config
-$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions);
+global $imap_stream_options; // in case not defined in config
+$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options);
$aMailbox = sqm_api_mailbox_select($imapConnection, $account, $mailbox,array(),array());
if (isset($aMailbox['MSG_HEADERS'][$passed_id]['MESSAGE_OBJECT']) &&
sqgetGlobalVar('smtoken', $submitted_token, SQ_GET, '');
sm_validate_security_token($submitted_token, -1, TRUE);
-global $imapSslOptions; // in case not defined in config
-$imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions);
+global $imap_stream_options; // in case not defined in config
+$imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options);
$mailbox = $trash_folder;
$boxes = sqimap_mailbox_list($imap_stream);
/* end of get globals */
-global $imapSslOptions; // in case not defined in config
-$imapConnection = sqimap_login ($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions);
+global $imap_stream_options; // in case not defined in config
+$imapConnection = sqimap_login ($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options);
/* switch to the right function based on what the user selected */
if ( sqgetGlobalVar('smaction', $action, SQ_POST) ) {
// open a connection on the imap port (143)
// why hide the output?
-global $imapSslOptions; // in case not defined in config
-$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, true, $imapSslOptions);
+global $imap_stream_options; // in case not defined in config
+$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, true, $imap_stream_options);
/**
* Using stristr since very old preferences may contain "None" and "none".
}
/* Verify that username and password are correct. */
-global $imapSslOptions; // in case not defined in config
-$imapConnection = sqimap_login($login_username, $key, $imapServerAddress, $imapPort, 0, $imapSslOptions);
+global $imap_stream_options; // in case not defined in config
+$imapConnection = sqimap_login($login_username, $key, $imapServerAddress, $imapPort, 0, $imap_stream_options);
/* From now on we are logged it. If the login failed then sqimap_login handles it */
/**
/* Open an imap connection */
-global $imapSslOptions; // in case not defined in config
-$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions);
+global $imap_stream_options; // in case not defined in config
+$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options);
$mailbox = (isset($mailbox) && $mailbox) ? $mailbox : 'INBOX';
uasort($imap_asearch_options, 'asearch_unhtml_strcoll');
/* open IMAP connection */
-global $imapSslOptions; // in case not defined in config
-$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions);
+global $imap_stream_options; // in case not defined in config
+$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options);
/* get mailboxes once here */
sqgetGlobalVar('startMessage', $startMessage, SQ_GET);
/* end globals */
-global $imapSslOptions; // in case not defined in config
-$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions);
+global $imap_stream_options; // in case not defined in config
+$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options);
sqimap_mailbox_select($imapConnection, $mailbox);
displayPageHeader($color);
}
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
-global $imapSslOptions; // in case not defined in config
+global $imap_stream_options; // in case not defined in config
$imapConnection = sqimap_login($username, false, $imapServerAddress,
- $imapPort, 0, $imapSslOptions);
+ $imapPort, 0, $imap_stream_options);
$mbx_response = sqimap_mailbox_select($imapConnection, $mailbox, false, false, true);
$header = parse_viewheader($imapConnection,$passed_id, $passed_ent_id);
// TODO: add required var checks here.
-global $imapSslOptions; // in case not defined in config
-$imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions);
+global $imap_stream_options; // in case not defined in config
+$imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options);
$mbx_response = sqimap_mailbox_select($imap_stream, $mailbox);
$message = &$messages[$mbx_response['UIDVALIDITY']][$passed_id];
sqgetGlobalVar('QUERY_STRING', $QUERY_STRING, SQ_SERVER);
sqgetGlobalVar('passed_id', $passed_id, SQ_GET, NULL, SQ_TYPE_BIGINT);
-global $imapSslOptions; // in case not defined in config
-$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions);
+global $imap_stream_options; // in case not defined in config
+$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options);
$mbx_response = sqimap_mailbox_select($imapConnection, $mailbox);
$message = &$messages[$mbx_response['UIDVALIDITY']][$passed_id];