| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 20 | public function __construct(array $sender, array $recipients, array $message){ |
||
| 21 | $mail = new PHPMailer; |
||
| 22 | $mail->From = $sender["address"]; |
||
| 23 | $mail->FromName = $sender["name"]; |
||
| 24 | $mail->addReplyTo = $sender["replyTo"]; |
||
| 25 | |||
| 26 | foreach ($recipients as $key => $value) { |
||
| 27 | $mail->addAddress($value["address"]); |
||
| 28 | } |
||
| 29 | |||
| 30 | $mail->Subject = $message["subject"]; |
||
| 31 | $mail->Body = $message["body"]; |
||
| 32 | $mail->AltBody = $message["alt"]; |
||
| 33 | $mail->isHTML($message["isHtml"]); |
||
| 34 | |||
| 35 | return $mail->send(); |
||
|
|
|||
| 36 | } |
||
| 37 | } |