diff --git a/admin/inc/class.admin_mail.inc.php b/admin/inc/class.admin_mail.inc.php index 657f3e52fd..72898fd93d 100644 --- a/admin/inc/class.admin_mail.inc.php +++ b/admin/inc/class.admin_mail.inc.php @@ -228,8 +228,8 @@ class admin_mail { $content['acc_imap_username'] = $content['ident_email']; } - // supported oauth providers - if (($oauth = OpenIDConnectClient::providerByDomain($content['acc_imap_username']))) + // supported oauth provider or mail-server of them for custom domains + if (($oauth = OpenIDConnectClient::providerByDomain($content['acc_imap_username'], $content['acc_imap_host']))) { $content['output'] .= lang('Using IMAP:%1, SMTP:%2, OAUTH:%3:', $oauth['imap'], $oauth['smtp'], $oauth['provider'])."\n"; $hosts[$oauth['imap']] = true; @@ -1811,4 +1811,4 @@ class admin_mail_logger { fwrite($this->fp, $msg."\n"); } -} \ No newline at end of file +}