Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
28 | public function assemble($to, Template $template, array $data) |
||
29 | { |
||
30 | $html = new MimePart($template->getBody($data)); |
||
31 | $html->type = "text/html"; |
||
32 | $body = new MimeMessage(); |
||
33 | $body->addPart($html); |
||
34 | |||
35 | $message = new Message(); |
||
36 | |||
37 | $message |
||
38 | ->addFrom($this->config['from-email'], $this->config['from-name']) |
||
39 | ->addTo($to) |
||
40 | ->setSubject($template->getSubject()) |
||
41 | ->setBody($body) |
||
42 | ->setEncoding("UTF-8"); |
||
43 | |||
44 | return $message; |
||
45 | } |
||
46 | } |