Fix from stinger to allow mail auth to work agains POP3 and IMAP servers

This commit is contained in:
sjb4891 2001-02-02 19:04:19 +00:00
parent e19979e156
commit f35a6a9a19

View File

@ -40,8 +40,13 @@
$phpgw_info["server"]["mail_port"] = "110";
}
$mailauth = imap_open("{".$phpgw_info["server"]["mail_server"]
.":".$phpgw_info["server"]["mail_port"]."}INBOX", $username , $passwd);
if( $phpgw_info["server"]["mail_server_type"]=="pop3") {
$mailauth = imap_open("{".$phpgw_info["server"]["mail_server"]."/pop3"
.":".$phpgw_info["server"]["mail_port"]."}INBOX", $username , $passwd);
} else { //assume imap
$mailauth = imap_open("{".$phpgw_info["server"]["mail_server"]
.":".$phpgw_info["server"]["mail_port"]."}INBOX", $username , $passwd);
}
error_reporting(error_reporting() + 2);
if ($mailauth == False) {
@ -56,4 +61,4 @@
return False;
}
}
?>
?>