| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | public function authenticate(SMTPClient $client): void |
||
| 38 | { |
||
| 39 | // NOTE: I don't know if any of this is correct or not - it was ported from somewhere else |
||
| 40 | |||
| 41 | $auth_str = sprintf("user=%s%sauth=Bearer %s%s%s", |
||
| 42 | $this->user, |
||
| 43 | chr(1), |
||
| 44 | $this->token, |
||
| 45 | chr(1), |
||
| 46 | chr(1) |
||
| 47 | ); |
||
| 48 | |||
| 49 | $auth_str = base64_encode($auth_str); |
||
| 50 | |||
| 51 | $client->sendCommand("AUTH XOAUTH2 {$auth_str}", "235"); |
||
| 52 | } |
||
| 54 |