From e146912692c921160f93dcb6da97dc6246bf95d2 Mon Sep 17 00:00:00 2001 From: lkehresman Date: Sun, 19 Mar 2000 13:56:44 +0000 Subject: [PATCH] Added use of $imapPort git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@312 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_general.php | 4 ++-- src/compose.php | 8 ++++---- src/delete_message.php | 2 +- src/download.php | 2 +- src/empty_trash.php | 2 +- src/folders.php | 2 +- src/folders_create.php | 2 +- src/folders_delete.php | 2 +- src/folders_rename_do.php | 2 +- src/folders_rename_getname.php | 2 +- src/left_main.php | 2 +- src/move_messages.php | 2 +- src/options.php | 2 +- src/read_body.php | 2 +- src/right_main.php | 2 +- src/webmail.php | 2 +- 16 files changed, 20 insertions(+), 20 deletions(-) diff --git a/functions/imap_general.php b/functions/imap_general.php index 3e825829..d2812bdf 100755 --- a/functions/imap_general.php +++ b/functions/imap_general.php @@ -63,9 +63,9 @@ ** Logs the user into the imap server. If $hide is set, no error messages ** will be displayed. This function returns the imap connection handle. ******************************************************************************/ - function sqimap_login ($username, $password, $imap_server_address, $hide) { + function sqimap_login ($username, $password, $imap_server_address, $imap_port, $hide) { global $color; - $imap_stream = fsockopen ($imap_server_address, 143, &$error_number, &$error_string); + $imap_stream = fsockopen ($imap_server_address, $imap_port, &$error_number, &$error_string); $server_info = fgets ($imap_stream, 1024); /** Do some error correction **/ diff --git a/src/compose.php b/src/compose.php index adcac3e5..3571c55e 100644 --- a/src/compose.php +++ b/src/compose.php @@ -278,14 +278,14 @@ header ("Location: right_main.php"); } else { echo "\n"; - $imapConnection = sqimap_login($username, $key, $imapServerAddress, 0); + $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); displayPageHeader($color, "None"); showInputForm(); } } else if (isset($attach)) { echo "\n"; - $imapConnection = sqimap_login($username, $key, $imapServerAddress, 0); + $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); displayPageHeader($color, "None"); $localfilename = md5("$attachfile, $attachfile_name, $REMOTE_IP, $REMOTE_PORT, $UNIQUE_ID, and everything else that may add entropy"); @@ -313,7 +313,7 @@ showInputForm(); } else if (isset($do_delete)) { echo "\n"; - $imapConnection = sqimap_login($username, $key, $imapServerAddress, 0); + $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); displayPageHeader($color, "None"); while (list($key, $localname) = each($delete)) { @@ -325,7 +325,7 @@ showInputForm(); } else { echo "\n"; - $imapConnection = sqimap_login($username, $key, $imapServerAddress, 0); + $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); displayPageHeader($color, "None"); $newmail = true; diff --git a/src/delete_message.php b/src/delete_message.php index db693cdc..7795829e 100644 --- a/src/delete_message.php +++ b/src/delete_message.php @@ -14,7 +14,7 @@ echo "\n"; - $imapConnection = sqimap_login($username, $key, $imapServerAddress, 0); + $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); sqimap_mailbox_select($imapConnection, $mailbox); displayPageHeader($color, $mailbox); diff --git a/src/download.php b/src/download.php index a4a81a1e..8009c028 100644 --- a/src/download.php +++ b/src/download.php @@ -35,7 +35,7 @@ echo ""; } - $imapConnection = sqimap_login($username, $key, $imapServerAddress, 0); + $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); sqimap_mailbox_select($imapConnection, $mailbox); // $message contains all information about the message diff --git a/src/empty_trash.php b/src/empty_trash.php index ba62c085..4a4d8d9d 100644 --- a/src/empty_trash.php +++ b/src/empty_trash.php @@ -11,7 +11,7 @@ include("../src/load_prefs.php"); - $imap_stream = sqimap_login($username, $key, $imapServerAddress, 0); + $imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); sqimap_mailbox_list($imap_stream, $boxes); diff --git a/src/folders.php b/src/folders.php index 12da0c38..861ddf09 100644 --- a/src/folders.php +++ b/src/folders.php @@ -22,7 +22,7 @@ echo " \n"; echo "\n"; - $imapConnection = sqimap_login ($username, $key, $imapServerAddress, 0); + $imapConnection = sqimap_login ($username, $key, $imapServerAddress, $imapPort, 0); $boxes = sqimap_mailbox_list($imapConnection); /** DELETING FOLDERS **/ diff --git a/src/folders_create.php b/src/folders_create.php index 480f052f..e7e55049 100644 --- a/src/folders_create.php +++ b/src/folders_create.php @@ -12,7 +12,7 @@ include("../src/load_prefs.php"); - $imapConnection = sqimap_login($username, $key, $imapServerAddress, 0); + $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); $dm = sqimap_get_delimiter($imapConnection); if (strpos($folder_name, "\"") || strpos($folder_name, ".") || diff --git a/src/folders_delete.php b/src/folders_delete.php index ec1f61a1..8ea828c5 100644 --- a/src/folders_delete.php +++ b/src/folders_delete.php @@ -24,7 +24,7 @@ displayPageHeader($color, "None"); - $imap_stream = sqimap_login($username, $key, $imapServerAddress, 0); + $imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); $boxes = sqimap_mailbox_list ($imap_stream); $dm = sqimap_get_delimiter($imap_stream); if (substr($mailbox, -1) == $dm) diff --git a/src/folders_rename_do.php b/src/folders_rename_do.php index ce3265dc..38442c9d 100644 --- a/src/folders_rename_do.php +++ b/src/folders_rename_do.php @@ -10,7 +10,7 @@ include("../src/load_prefs.php"); - $imapConnection = sqimap_login($username, $key, $imapServerAddress, 0); + $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); $dm = sqimap_get_delimiter($imapConnection); if (strpos($orig, $dm)) diff --git a/src/folders_rename_getname.php b/src/folders_rename_getname.php index 6b6b6fd4..cadb70fe 100644 --- a/src/folders_rename_getname.php +++ b/src/folders_rename_getname.php @@ -10,7 +10,7 @@ include("../src/load_prefs.php"); - $imapConnection = sqimap_login($username, $key, $imapServerAddress, 0); + $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); $dm = sqimap_get_delimiter($imapConnection); if (substr($old, strlen($old) - strlen($dm)) == $dm) { diff --git a/src/left_main.php b/src/left_main.php index 281b3fff..a6702f23 100644 --- a/src/left_main.php +++ b/src/left_main.php @@ -71,7 +71,7 @@ } // open a connection on the imap port (143) - $imapConnection = sqimap_login($username, $key, $imapServerAddress, 10); // the 10 is to hide the output + $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 10); // the 10 is to hide the output /** If it was a successful login, lets load their preferences **/ include("../src/load_prefs.php"); diff --git a/src/move_messages.php b/src/move_messages.php index fb973b34..56e96e74 100644 --- a/src/move_messages.php +++ b/src/move_messages.php @@ -37,7 +37,7 @@ } } - $imapConnection = sqimap_login($username, $key, $imapServerAddress, 0); + $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); sqimap_mailbox_select($imapConnection, $mailbox); // If the delete button was pressed, the moveButton variable will not be set. diff --git a/src/options.php b/src/options.php index b80e70df..83d58fb4 100644 --- a/src/options.php +++ b/src/options.php @@ -17,7 +17,7 @@ include("../src/load_prefs.php"); - $imapConnection = sqimap_login($username, $key, $imapServerAddress); + $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort); $boxes = sqimap_mailbox_list($imapConnection, $boxes); fputs($imapConnection, "1 logout\n"); diff --git a/src/read_body.php b/src/read_body.php index 6cafd3fe..4c9f5c31 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -14,7 +14,7 @@ include("../src/load_prefs.php"); - $imapConnection = sqimap_login($username, $key, $imapServerAddress, 0); + $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); sqimap_mailbox_select($imapConnection, $mailbox); // $message contains all information about the message diff --git a/src/right_main.php b/src/right_main.php index 3d48d1ba..b35d0b70 100644 --- a/src/right_main.php +++ b/src/right_main.php @@ -58,7 +58,7 @@ ///////////////////////////////////////////////////////////////////////////////// // open a connection on the imap port (143) - $imapConnection = sqimap_login($username, $key, $imapServerAddress, 0); + $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); /** If it was a successful login, lets load their preferences **/ include("../src/load_prefs.php"); diff --git a/src/webmail.php b/src/webmail.php index 50d8c611..41cf17c2 100644 --- a/src/webmail.php +++ b/src/webmail.php @@ -26,7 +26,7 @@ include ("../functions/imap.php"); // verify that username and password are correct - $imapConnection = sqimap_login($username, $key, $imapServerAddress, 0); + $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); include ("../src/load_prefs.php"); -- 2.25.1