fix OAuth to also be triggered by name of imap-server, eg. for custom domains

This commit is contained in:
ralf 2023-01-23 21:11:21 +01:00
parent 2b472398ad
commit dc3e8c5b7d

View File

@ -228,8 +228,8 @@ class admin_mail
{ {
$content['acc_imap_username'] = $content['ident_email']; $content['acc_imap_username'] = $content['ident_email'];
} }
// supported oauth providers // supported oauth provider or mail-server of them for custom domains
if (($oauth = OpenIDConnectClient::providerByDomain($content['acc_imap_username']))) 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"; $content['output'] .= lang('Using IMAP:%1, SMTP:%2, OAUTH:%3:', $oauth['imap'], $oauth['smtp'], $oauth['provider'])."\n";
$hosts[$oauth['imap']] = true; $hosts[$oauth['imap']] = true;