Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
preparedoauthcredentials.php
1<?php
2
4
8class PreparedOauthCredentials extends \PHPMailer\PHPMailer\OAuth
9{
15 public function __construct(array $options)
16 {
17 parent::__construct($options);
18 $this->oauthToken = $options['token'];
19 }
20
26 public function getOauth64(): string
27 {
28 return base64_encode(
29 'user=' .
30 $this->oauthUserEmail .
31 "\001auth=Bearer " .
32 $this->oauthToken .
33 "\001\001"
34 );
35 }
36}