summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-04-14 07:35:12 +0000
committeralecpl <alec@alec.pl>2009-04-14 07:35:12 +0000
commitf86e8f5faa0fb5926001f2dccd970e031e7cb59a (patch)
treea1b1e0da98d9dd8ac885eb33ddc344d3c0537b34 /program/include
parent58c9dd72935e9ea4403681997bb1beb291d70bd4 (diff)
- Support STARTTLS in IMAP connection (#1485284)
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcmail.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 71601b526..9aad25b27 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -436,11 +436,13 @@ class rcmail
if ($a_host['host']) {
$host = $a_host['host'];
$imap_ssl = (isset($a_host['scheme']) && in_array($a_host['scheme'], array('ssl','imaps','tls'))) ? $a_host['scheme'] : null;
- $imap_port = isset($a_host['port']) ? $a_host['port'] : ($imap_ssl ? 993 : $config['default_port']);
+ if(!empty($a_host['port']))
+ $imap_port = $a_host['port'];
+ else if ($imap_ssl && $imap_ssl != 'tls')
+ $imap_port = 993;
}
- else
- $imap_port = $config['default_port'];
-
+
+ $imap_port = $imap_port ? $imap_port : $config['default_port'];
/* Modify username with domain if required
Inspired by Marco <P0L0_notspam_binware.org>