1 | <?php |
||
7 | class EmailMessage |
||
8 | { |
||
9 | private $headers = []; |
||
10 | private $subject = ''; |
||
11 | private $body = ''; |
||
12 | private $contentType = 'text/plain'; |
||
13 | |||
14 | 1 | public function getHeaders(): array |
|
18 | |||
19 | 5 | public function from(string $email, string $name = null) |
|
25 | |||
26 | public function getFrom(): array |
||
30 | |||
31 | 1 | public function sender(string $email, string $name = null) |
|
37 | |||
38 | public function getSender(): string |
||
42 | |||
43 | 1 | public function replyTo(string $email, string $name = null) |
|
49 | |||
50 | public function getReplyTo(): array |
||
54 | |||
55 | 4 | public function to(string $email, string $name = null) |
|
61 | |||
62 | 4 | public function getTo(): array |
|
66 | |||
67 | 1 | public function cc(string $email, string $name = null) |
|
73 | |||
74 | public function getCc(): array |
||
78 | |||
79 | 1 | public function bcc(string $email, string $name = null) |
|
85 | |||
86 | public function getBcc(): array |
||
90 | |||
91 | 5 | public function subject(string $subject) |
|
97 | |||
98 | 1 | public function getSubject(): string |
|
102 | |||
103 | 5 | public function textBody(string $textBody) |
|
109 | |||
110 | public function htmlBody(string $htmlBody) |
||
118 | |||
119 | 2 | public function getBody(): string |
|
123 | |||
124 | public function getContentType(): string |
||
128 | |||
129 | 5 | private function createAddress(string $email, ?string $name): string |
|
133 | } |
||
134 |