From 143cbc5d4257da81d5a6f83053e1b387034bcbda Mon Sep 17 00:00:00 2001 From: skeeter Date: Tue, 17 Sep 2002 02:47:35 +0000 Subject: [PATCH] GNU Patch #290. --- phpgwapi/inc/class.auth_mail.inc.php | 20 ++++++++++++++++++++ phpgwapi/inc/class.common.inc.php | 8 ++++++++ 2 files changed, 28 insertions(+) diff --git a/phpgwapi/inc/class.auth_mail.inc.php b/phpgwapi/inc/class.auth_mail.inc.php index 492b4c3364..62d79b4d82 100644 --- a/phpgwapi/inc/class.auth_mail.inc.php +++ b/phpgwapi/inc/class.auth_mail.inc.php @@ -43,11 +43,31 @@ { $GLOBALS['phpgw_info']['server']['mail_port'] = '110'; } + elseif ($GLOBALS['phpgw_info']['server']['mail_server_type']=='imaps') + { + $GLOBALS['phpgw_info']['server']['mail_port'] = '993'; + } + elseif ($GLOBALS['phpgw_info']['server']['mail_server_type']=='pop3s') + { + $GLOBALS['phpgw_info']['server']['mail_port'] = '995'; + } if( $GLOBALS['phpgw_info']['server']['mail_server_type']=='pop3') { $mailauth = imap_open('{'.$GLOBALS['phpgw_info']['server']['mail_server'].'/pop3' .':'.$GLOBALS['phpgw_info']['server']['mail_port'].'}INBOX', $username , $passwd); + } + elseif ( $GLOBALS['phpgw_info']['server']['mail_server_type']=='imaps' ) + { + // IMAPS support: + $mailauth = imap_open('{'.$GLOBALS['phpgw_info']['server']['mail_server']."/ssl/novalidate-cert" + .':993}INBOX', $username , $passwd); + } + elseif ( $GLOBALS['phpgw_info']['server']['mail_server_type']=='pop3s' ) + { + // POP3S support: + $mailauth = imap_open('{'.$GLOBALS['phpgw_info']['server']['mail_server']."/ssl/novalidate-cert" + .':995}INBOX', $username , $passwd); } else { diff --git a/phpgwapi/inc/class.common.inc.php b/phpgwapi/inc/class.common.inc.php index 782f2168e8..8a27411c8e 100644 --- a/phpgwapi/inc/class.common.inc.php +++ b/phpgwapi/inc/class.common.inc.php @@ -1863,6 +1863,14 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info' { $prefs['email']['mail_port'] = '110'; } + elseif ($prefs['email']['mail_server_type']=='imaps') + { + $prefs['email']['mail_port'] = '993'; + } + elseif ($prefs['email']['mail_server_type']=='pop3s') + { + $prefs['email']['mail_port'] = '995'; + } // This is going to be used to switch to the nntp class if (isset($GLOBALS['phpgw_info']['flags']['newsmode']) && $GLOBALS['phpgw_info']['flags']['newsmode'])