Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
30 | public function send($to, $subject, $body, $attachments=array()) |
||
31 | { |
||
32 | $this->mailer->addAddress($to); |
||
33 | $this->mailer->Subject = $subject; |
||
34 | $this->mailer->msgHTML($body); |
||
35 | foreach ($attachments as $att) { |
||
36 | $file = $_SERVER['DOCUMENT_ROOT'].Application::getDir()."/resources/".$att; |
||
37 | $this->mailer->addAttachment($file); |
||
38 | } |
||
39 | |||
40 | $sent = $this->mailer->send(); |
||
41 | $this->error = $this->mailer->ErrorInfo; |
||
42 | return $sent; |
||
43 | } |
||
45 |