diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-02-08 17:18:32 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-02-08 17:18:32 +0000 |
| commit | f5f293ee602c7e2aa7594a6984577b9ac2f8d040 (patch) | |
| tree | ff1c538c59531af94e9337cbdd8d0687d96c0b20 /roundcubemail/program/include/rcube_imap.inc | |
| parent | ebcb788e3b7cc08597a1f19e7acf34c3ec1f01bb (diff) | |
Distinguish ssl and tls for imap connections (#1484667)
git-svn-id: https://svn.roundcube.net/trunk@1031 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_imap.inc')
| -rw-r--r-- | roundcubemail/program/include/rcube_imap.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/roundcubemail/program/include/rcube_imap.inc b/roundcubemail/program/include/rcube_imap.inc index 1f94adcd1..f7584041a 100644 --- a/roundcubemail/program/include/rcube_imap.inc +++ b/roundcubemail/program/include/rcube_imap.inc @@ -97,17 +97,17 @@ class rcube_imap * @param string Username for IMAP account * @param string Password for IMAP account * @param number Port to connect to - * @param boolean Use SSL connection + * @param string SSL schema (either ssl or tls) or null if plain connection * @return boolean TRUE on success, FALSE on failure * @access public */ - function connect($host, $user, $pass, $port=143, $use_ssl=FALSE) + function connect($host, $user, $pass, $port=143, $use_ssl=null) { global $ICL_SSL, $ICL_PORT, $IMAP_USE_INTERNAL_DATE; // check for Open-SSL support in PHP build if ($use_ssl && in_array('openssl', get_loaded_extensions())) - $ICL_SSL = TRUE; + $ICL_SSL = $use_ssl == 'imaps' ? 'ssl' : $use_ssl; else if ($use_ssl) { raise_error(array('code' => 403, 'type' => 'imap', 'file' => __FILE__, |
