Add ability to show login error from the IMAP server instead of traditional "Unknown...
[squirrelmail.git] / plugins / filters / filters.php
index 77876908aee5248e94a2cc13608bad5e22e1baf5..2086c2cdae2ae34590c665b5ef45534703cbdafd 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * Message and Spam Filter Plugin - Filtering Functions
  *
- * @copyright 1999-2009 The SquirrelMail Project Team
+ * @copyright 1999-2014 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package plugins
@@ -190,9 +190,9 @@ function filters_bulkquery($filters, $IPs) {
  * @access private
  */
 function start_filters($hook_args) {
-    global $imapServerAddress, $imapPort, $imap_stream, $imapConnection,
-           $UseSeparateImapConnection, $AllowSpamFilters, $filter_inbox_count,
-           $username;
+    global $imapServerAddress, $imapPort, $imapSslOptions, $imap_stream,
+           $imapConnection, $UseSeparateImapConnection, $AllowSpamFilters,
+           $filter_inbox_count, $username;
 
     /**
      * check hook that calls filtering. If filters are called by right_main_after_header,
@@ -229,7 +229,7 @@ function start_filters($hook_args) {
     if ((!isset($imap_stream) && !isset($imapConnection)) ||
         $UseSeparateImapConnection ) {
             $stream = sqimap_login($username, false, $imapServerAddress,
-                                $imapPort, 10);
+                                $imapPort, 10, $imapSslOptions);
             $previously_connected = false;
     } else if (isset($imapConnection)) {
         $stream = $imapConnection;