Add ability to show login error from the IMAP server instead of traditional "Unknown...
[squirrelmail.git] / plugins / filters / options.php
index 7395a3b938da972ce46b62e3c705e48dd178ed4e..6ea5290ef83905d1e0b4d33c5cd6f7d00fb5338e 100644 (file)
@@ -25,6 +25,7 @@ sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
 
 sqgetGlobalVar('theid', $theid);
 sqgetGlobalVar('action', $action, SQ_GET);
+global $imapSslOptions; // in case not defined in config
 
 if (sqgetGlobalVar('filter_submit',$filter_submit,SQ_POST)) {
 
@@ -125,7 +126,7 @@ if (sqgetGlobalVar('filter_submit',$filter_submit,SQ_POST)) {
 
     if (isset($action) && ($action == 'add' || $action == 'edit')) {
 
-        $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0);
+        $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions);
         $boxes = sqimap_mailbox_list($imapConnection);
 
         for ($a = 0, $cnt = count($boxes); $a < $cnt; $a++) {