PHPMailer\PHPMailer\OAuth::getOauth64 PHP Method

getOauth64() public method

Generate a base64-encoded OAuth token.
public getOauth64 ( ) : string
return string
    public function getOauth64()
    {
        // Get a new token if it's not available or has expired
        if (is_null($this->oauthToken) or $this->oauthToken->hasExpired()) {
            $this->oauthToken = $this->getToken();
        }
        return base64_encode('user=' . $this->oauthUserEmail . "auth=Bearer " . $this->oauthToken . "");
    }