From d2b802fbed7cb446268898bb22b1bce07e877c25 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 30 Jun 2022 01:08:48 +0200 Subject: [PATCH] Complete smtps code --- htdocs/core/class/smtps.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php index dbaaacc2d18..f87d2fce82c 100644 --- a/htdocs/core/class/smtps.class.php +++ b/htdocs/core/class/smtps.class.php @@ -581,6 +581,13 @@ class SMTPs // The error here just means the ID/password combo doesn't work. $_retVal = $this->socket_send_str(base64_encode("\0".$this->_smtpsID."\0".$this->_smtpsPW), '235'); break; + case 'XOAUTH2': + $xxxx = 'token ?'; + $_retVal = $this->socket_send_str('AUTH XOAUTH2 '.$xxxx, '235'); + if (!$_retVal) { + $this->_setErr(130, 'Error when asking for AUTH XOAUTH2'); + } + break; case 'LOGIN': // most common case default: $_retVal = $this->socket_send_str('AUTH LOGIN', '334'); @@ -590,7 +597,7 @@ class SMTPs // User name will not return any error, server will take anything we give it. $this->socket_send_str(base64_encode($this->_smtpsID), '334'); // The error here just means the ID/password combo doesn't work. - // There is not a method to determine which is the problem, ID or password + // There is no method to determine which is the problem, ID or password $_retVal = $this->socket_send_str(base64_encode($this->_smtpsPW), '235'); } break;