![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/laminas/laminas-mail/src/Protocol/Pop3/Xoauth2/ |
<?php namespace Laminas\Mail\Protocol\Pop3\Xoauth2; use Laminas\Mail\Protocol\Exception\RuntimeException; use Laminas\Mail\Protocol\Pop3; use Laminas\Mail\Protocol\Xoauth2\Xoauth2; /** * @final */ class Microsoft extends Pop3 { protected const AUTH_INITIALIZE_REQUEST = 'AUTH XOAUTH2'; protected const AUTH_RESPONSE_INITIALIZED_OK = '+'; /** * @param string $user the target mailbox to access * @param string $password OAUTH2 accessToken * @param bool $tryApop obsolete parameter not used here */ public function login($user, $password, $tryApop = true): void { $this->sendRequest(self::AUTH_INITIALIZE_REQUEST); $response = $this->readRemoteResponse(); if ($response->status() != self::AUTH_RESPONSE_INITIALIZED_OK) { throw new RuntimeException($response->message()); } $this->request(Xoauth2::encodeXoauth2Sasl($user, $password)); } }