git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@312
7612ce4b-ef26-0410-bec9-
ea0150e637f0
16 files changed:
** Logs the user into the imap server. If $hide is set, no error messages
** will be displayed. This function returns the imap connection handle.
******************************************************************************/
** 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) {
- $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 **/
$server_info = fgets ($imap_stream, 1024);
/** Do some error correction **/
header ("Location: right_main.php");
} else {
echo "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
header ("Location: right_main.php");
} else {
echo "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\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 "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
displayPageHeader($color, "None");
showInputForm();
}
} else if (isset($attach)) {
echo "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\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");
displayPageHeader($color, "None");
$localfilename = md5("$attachfile, $attachfile_name, $REMOTE_IP, $REMOTE_PORT, $UNIQUE_ID, and everything else that may add entropy");
showInputForm();
} else if (isset($do_delete)) {
echo "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
showInputForm();
} else if (isset($do_delete)) {
echo "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\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)) {
displayPageHeader($color, "None");
while (list($key, $localname) = each($delete)) {
showInputForm();
} else {
echo "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
showInputForm();
} else {
echo "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
- $imapConnection = sqimap_login($username, $key, $imapServerAddress, 0);
+ $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
displayPageHeader($color, "None");
$newmail = true;
displayPageHeader($color, "None");
$newmail = true;
echo "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
echo "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
- $imapConnection = sqimap_login($username, $key, $imapServerAddress, 0);
+ $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
sqimap_mailbox_select($imapConnection, $mailbox);
displayPageHeader($color, $mailbox);
sqimap_mailbox_select($imapConnection, $mailbox);
displayPageHeader($color, $mailbox);
echo "</TT></TD></TR></TABLE>";
}
echo "</TT></TD></TR></TABLE>";
}
- $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
sqimap_mailbox_select($imapConnection, $mailbox);
// $message contains all information about the message
include("../src/load_prefs.php");
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);
sqimap_mailbox_list($imap_stream, $boxes);
echo " </TD></TR>\n";
echo "</TABLE>\n";
echo " </TD></TR>\n";
echo "</TABLE>\n";
- $imapConnection = sqimap_login ($username, $key, $imapServerAddress, 0);
+ $imapConnection = sqimap_login ($username, $key, $imapServerAddress, $imapPort, 0);
$boxes = sqimap_mailbox_list($imapConnection);
/** DELETING FOLDERS **/
$boxes = sqimap_mailbox_list($imapConnection);
/** DELETING FOLDERS **/
include("../src/load_prefs.php");
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, ".") ||
$dm = sqimap_get_delimiter($imapConnection);
if (strpos($folder_name, "\"") || strpos($folder_name, ".") ||
displayPageHeader($color, "None");
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)
$boxes = sqimap_mailbox_list ($imap_stream);
$dm = sqimap_get_delimiter($imap_stream);
if (substr($mailbox, -1) == $dm)
include("../src/load_prefs.php");
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))
$dm = sqimap_get_delimiter($imapConnection);
if (strpos($orig, $dm))
include("../src/load_prefs.php");
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) {
$dm = sqimap_get_delimiter($imapConnection);
if (substr($old, strlen($old) - strlen($dm)) == $dm) {
}
// open a connection on the imap port (143)
}
// 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");
/** If it was a successful login, lets load their preferences **/
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);
// If the delete button was pressed, the moveButton variable will not be set.
sqimap_mailbox_select($imapConnection, $mailbox);
// If the delete button was pressed, the moveButton variable will not be set.
include("../src/load_prefs.php");
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");
$boxes = sqimap_mailbox_list($imapConnection, $boxes);
fputs($imapConnection, "1 logout\n");
include("../src/load_prefs.php");
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
sqimap_mailbox_select($imapConnection, $mailbox);
// $message contains all information about the message
/////////////////////////////////////////////////////////////////////////////////
// open a connection on the imap port (143)
/////////////////////////////////////////////////////////////////////////////////
// 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");
/** If it was a successful login, lets load their preferences **/
include("../src/load_prefs.php");
include ("../functions/imap.php");
// verify that username and password are correct
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");
include ("../src/load_prefs.php");