Brain-damage in sqimap_create_stream(). Can't believe I let myself commit this funct...
authortassium <tassium@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 26 Feb 2004 16:19:29 +0000 (16:19 +0000)
committertassium <tassium@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 26 Feb 2004 16:19:29 +0000 (16:19 +0000)
sqimap_create_stream() was not as generalized as it should have been - it was still using $imap_server and $use_imap_tls, etc.  Now obeying passed params as it should.

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6666 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_general.php

index 6f0a7c6f44b78b507d1bf478b223c977179dab21..d2687a3b4ebddb7712cf71c58657635a8f5a181c 100755 (executable)
@@ -567,10 +567,10 @@ function sqimap_read_data ($imap_stream, $tag_uid, $handle_errors,
 function sqimap_create_stream($server,$port,$tls=false) {
     global $username, $use_imap_tls;
 
-    if ($use_imap_tls == true) {
+    if ($tls == true) {
         if ((check_php_version(4,3)) and (extension_loaded('openssl'))) {
             /* Use TLS by prefixing "tls://" to the hostname */
-            $server = 'tls://' . $imap_server_address;
+            $server = 'tls://' . $server;
         } else {
             require_once(SM_PATH . 'functions/display_messages.php');
             $string = "Unable to connect to IMAP server!<br>TLS is enabled, but this " .