Add ability to show login error from the IMAP server instead of traditional "Unknown...
[squirrelmail.git] / plugins / mail_fetch / options.php
index 7fd4a2ef6380084f1ec03a8b84c7a16552190b95..d6f4f0d09c55207e11ce24005df26ebdb56bb49c 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Setup of the mailfetch plugin.
  *
- * @copyright 1999-2013 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
@@ -59,6 +59,7 @@ sqgetGlobalVar('submit_mailfetch', $submit_mailfetch, SQ_POST);
 $mf_port = trim($mf_port);
 $mf_server = trim($mf_server);
 
+global $imapSslOptions; // in case not defined in config
 
 /* end globals */
 
@@ -301,7 +302,7 @@ switch( $mf_action ) {
          html_tag( 'tr' ) .
              html_tag( 'th', _("Store in Folder:"), 'right' ) .
              html_tag( 'td', '', 'left' );
-     $imapConnection = sqimap_login ($username, false, $imapServerAddress, $imapPort, 0);
+     $imapConnection = sqimap_login ($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions);
      $boxes = sqimap_mailbox_list($imapConnection);
      echo '<select name="mf_subfolder">';
 
@@ -436,7 +437,7 @@ switch( $mf_action ) {
                  html_tag( 'th', _("Store in Folder:"), 'right' ) .
                  html_tag( 'td', '', 'left' );
 
-     $imapConnection = sqimap_login ($username, false, $imapServerAddress, $imapPort, 0);
+     $imapConnection = sqimap_login ($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions);
      $boxes = sqimap_mailbox_list($imapConnection);
      echo '<select name="mf_subfolder">';
      $selected = 0;