Merge pull request #774 from e-foundation/fix-smtp-client-sasl

Fix issues with SMTP login mechanisms except "LOGIN"
This commit is contained in:
the-djmaze 2022-12-14 15:37:23 +01:00 committed by GitHub
commit 439ad5596f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -143,9 +143,7 @@ class SmtpClient extends \MailSo\Net\NetClient
$sPassword = $oSettings->Password;
$type = '';
// https://github.com/the-djmaze/snappymail/pull/423
// $oSettings->SASLMechanisms[] = 'LOGIN';
\array_unshift($oSettings->SASLMechanisms, 'LOGIN');
$oSettings->SASLMechanisms[] = 'LOGIN';
foreach ($oSettings->SASLMechanisms as $sasl_type) {
if ($this->IsAuthSupported($sasl_type) && \SnappyMail\SASL::isSupported($sasl_type)) {
$type = $sasl_type;