Happy New Year
[squirrelmail.git] / plugins / mail_fetch / functions.php
index a9b889eec4958da08d23ca8bc91648912c4bc21f..bc452c09968633fe8feb54823fdfde424010a7b0 100644 (file)
@@ -9,7 +9,7 @@
  * and josh@superfork.com (extracted from php manual)
  * Adapted for MailFetch by Philippe Mingo <mingo@rotedic.com>
  *
- * @copyright 1999-2014 The SquirrelMail Project Team
+ * @copyright 1999-2018 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package plugins
@@ -64,7 +64,7 @@ if (file_exists(SM_PATH . 'config/mail_fetch_config.php')) {
 function mail_fetch_login_function() {
     include_once (SM_PATH . 'functions/imap_general.php');
 
-    global $username, $data_dir, $imapServerAddress, $imapPort;
+    global $username, $data_dir, $imapServerAddress, $imapPort, $imap_stream_options;
 
     $mailfetch_newlog = getPref($data_dir, $username, 'mailfetch_newlog');
 
@@ -129,7 +129,7 @@ function mail_fetch_login_function() {
                 continue;
             }
 
-            $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 10);
+            $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 10, $imap_stream_options);
 
             /* log into pop server*/
             if (! $pop3->login($mailfetch_user, $mailfetch_pass)) {