Happy New Year
[squirrelmail.git] / plugins / mail_fetch / fetch.php
index 0383559c543eed24aa762501f408e01b37820b5f..ca2f10c2217028715bd3941be6798e34de58aa1b 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Fetch code.
  *
- * @copyright 1999-2014 The SquirrelMail Project Team
+ * @copyright 1999-2021 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package plugins
@@ -27,6 +27,7 @@ if (!in_array('mail_fetch', $plugins)) exit;
 
 /* globals */
 sqgetGlobalVar('delimiter',  $delimiter,  SQ_SESSION);
+global $imap_stream_options; // in case not defined in config
 /* end globals */
 
 /**
@@ -197,7 +198,7 @@ for ($i_loop=$i_start;$i_loop<$i_stop;$i_loop++) {
     }
 
     Mail_Fetch_Status(_("Opening IMAP server"));
-    $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 10);
+    $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 == '' ||