mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Resolve #1575
This commit is contained in:
parent
ad3313fda4
commit
0dcc468ae1
1 changed files with 8 additions and 1 deletions
|
|
@ -192,11 +192,18 @@ class SmtpClient extends \MailSo\Net\NetClient
|
||||||
{
|
{
|
||||||
$sRequest = '';
|
$sRequest = '';
|
||||||
if (\str_starts_with($type, 'SCRAM-')) {
|
if (\str_starts_with($type, 'SCRAM-')) {
|
||||||
// RFC 5802
|
// RFC 5802 send "client-first-message" and receive "server-first-message"
|
||||||
$sRequest = $SASL->authenticate($sLogin, $sPassword, $sResult);
|
$sRequest = $SASL->authenticate($sLogin, $sPassword, $sResult);
|
||||||
$this->logMask($sRequest);
|
$this->logMask($sRequest);
|
||||||
$sResult = $this->sendRequestWithCheck($sRequest, 334);
|
$sResult = $this->sendRequestWithCheck($sRequest, 334);
|
||||||
|
// RFC 5802 send "client-final-message" and receive "server-final-message"
|
||||||
$sRequest = $SASL->challenge($sResult);
|
$sRequest = $SASL->challenge($sResult);
|
||||||
|
$this->logMask($sRequest);
|
||||||
|
$sResult = $this->sendRequestWithCheck($sRequest, 334);
|
||||||
|
$SASL->verify($sResult);
|
||||||
|
// Now end the authentication
|
||||||
|
$sRequest = '';
|
||||||
|
$this->sendRequestWithCheck($sRequest, 235);
|
||||||
} else switch ($type) {
|
} else switch ($type) {
|
||||||
// RFC 4616
|
// RFC 4616
|
||||||
case 'PLAIN':
|
case 'PLAIN':
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue