Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
80.00% |
4 / 5 |
|
50.00% |
1 / 2 |
CRAP | |
0.00% |
0 / 1 |
Smtp | |
80.00% |
4 / 5 |
|
50.00% |
1 / 2 |
2.03 | |
0.00% |
0 / 1 |
__construct | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
1 | |||
send | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | /** |
3 | * Pop PHP Framework (http://www.popphp.org/) |
4 | * |
5 | * @link https://github.com/popphp/popphp-framework |
6 | * @author Nick Sagona, III <dev@nolainteractive.com> |
7 | * @copyright Copyright (c) 2009-2023 NOLA Interactive, LLC. (http://www.nolainteractive.com) |
8 | * @license http://www.popphp.org/license New BSD License |
9 | */ |
10 | |
11 | /** |
12 | * @namespace |
13 | */ |
14 | namespace Pop\Mail\Transport; |
15 | |
16 | use Pop\Mail\Message; |
17 | use Pop\Mail\Transport\Smtp\Stream\BufferInterface as BI; |
18 | |
19 | /** |
20 | * SMTP transport class |
21 | * |
22 | * @category Pop |
23 | * @package Pop\Mail |
24 | * @author Nick Sagona, III <dev@nolainteractive.com> |
25 | * @copyright Copyright (c) 2009-2023 NOLA Interactive, LLC. (http://www.nolainteractive.com) |
26 | * @license http://www.popphp.org/license New BSD License |
27 | * @version 3.6.0 |
28 | */ |
29 | class Smtp extends Smtp\EsmtpTransport implements TransportInterface |
30 | { |
31 | |
32 | /** |
33 | * Create a new SMTP transport |
34 | * |
35 | * @param string $host host |
36 | * @param int $port port |
37 | * @param string $sec security |
38 | * @param BI $buffer buffer |
39 | * @param array $handlers handlers |
40 | */ |
41 | public function __construct($host = 'localhost', $port = 25, $sec = null, BI $buffer = null, array $handlers = null) |
42 | { |
43 | parent::__construct($buffer, $handlers); |
44 | |
45 | $this->setHost($host); |
46 | $this->setPort($port); |
47 | $this->setEncryption($sec); |
48 | } |
49 | |
50 | /** |
51 | * Send the message |
52 | * |
53 | * @param Message $message |
54 | * @return int |
55 | */ |
56 | public function send(Message $message) |
57 | { |
58 | return parent::send($message); |
59 | } |
60 | |
61 | } |