From 55ddf1eabbc8b1201c9f69bb7babb8b8ad6f6712 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 30 Jun 2022 01:17:24 +0200 Subject: [PATCH] Doc --- htdocs/core/class/smtps.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php index f87d2fce82c..1f5a48a517d 100644 --- a/htdocs/core/class/smtps.class.php +++ b/htdocs/core/class/smtps.class.php @@ -582,8 +582,10 @@ class SMTPs $_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'); + // "user=$email\1auth=Bearer $token\1\1" + $token = 'xxx'; + $xxxx = "user=".$this->_smtpsID."\1auth=Bearer ".$token."\1\1"; + $_retVal = $this->socket_send_str('AUTH XOAUTH2 '.base64_encode($xxxx), '235'); if (!$_retVal) { $this->_setErr(130, 'Error when asking for AUTH XOAUTH2'); }