the-djmaze 2022-05-12 12:17:19 +02:00
parent 68d3ccd469
commit 35e6ab2cce

View file

@ -140,6 +140,13 @@ class ImapClient extends \MailSo\Net\NetClient
break;
}
}
if (!$type) {
throw new \Exception('No supported SASL mechanism found, remote server wants: '
. \implode(', ', \array_filter($this->Capability() ?: [], function($var){
return \str_starts_with($var, 'AUTH=');
}))
);
}
$SASL = \SnappyMail\SASL::factory($type);
$SASL->base64 = true;