| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2.0116 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | 2 | public function connect(string $client_domain): SMTPClient |
|
| 32 | { |
||
| 33 | 2 | $socket = @fsockopen($this->host, $this->port); |
|
| 34 | |||
| 35 | 2 | if (! $socket) { |
|
|
|
|||
| 36 | throw new SMTPException("Could not open SMTP Port."); |
||
| 37 | } |
||
| 38 | |||
| 39 | 2 | $client = new SMTPClient($socket); |
|
| 40 | |||
| 41 | 2 | $client->sendEHLO($client_domain); |
|
| 42 | |||
| 43 | 2 | return $client; |
|
| 44 | } |
||
| 46 |