mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 16:37:02 +03:00
Improve #1038
This commit is contained in:
parent
30c95ac04e
commit
b5356a4115
1 changed files with 3 additions and 4 deletions
|
|
@ -133,9 +133,10 @@ class SmtpClient extends \MailSo\Net\NetClient
|
||||||
$this->writeLogException(new \MailSo\Smtp\Exceptions\LoginBadMethodException);
|
$this->writeLogException(new \MailSo\Smtp\Exceptions\LoginBadMethodException);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->Settings->authPlainLine) {
|
$SASL = \SnappyMail\SASL::factory($type);
|
||||||
|
|
||||||
|
if ($this->Settings->authPlainLine && $SASL instanceof \SnappyMail\SASL\Plain) {
|
||||||
// https://github.com/the-djmaze/snappymail/issues/1038
|
// https://github.com/the-djmaze/snappymail/issues/1038
|
||||||
$SASL = \SnappyMail\SASL::factory('PLAIN');
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$sResult = $this->sendRequestWithCheck('AUTH', 235, 'PLAIN ' . $SASL->authenticate($sLogin, $sPassword));
|
$sResult = $this->sendRequestWithCheck('AUTH', 235, 'PLAIN ' . $SASL->authenticate($sLogin, $sPassword));
|
||||||
|
|
@ -148,8 +149,6 @@ class SmtpClient extends \MailSo\Net\NetClient
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Start authentication
|
// Start authentication
|
||||||
$SASL = \SnappyMail\SASL::factory($type);
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$sResult = $this->sendRequestWithCheck('AUTH', 334, $type);
|
$sResult = $this->sendRequestWithCheck('AUTH', 334, $type);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue