diff --git a/config/server-monitor.php b/config/server-monitor.php index 0623961..8669698 100644 --- a/config/server-monitor.php +++ b/config/server-monitor.php @@ -85,7 +85,10 @@ */ 'mail' => [ 'from' => 'your@email.com', - 'to' => 'your@email.com', + 'to' => [ + 'your@email.com', + 'another@email.com' + ] ], /* diff --git a/src/Notifications/Senders/Mail.php b/src/Notifications/Senders/Mail.php index e16b906..cc61d53 100644 --- a/src/Notifications/Senders/Mail.php +++ b/src/Notifications/Senders/Mail.php @@ -29,11 +29,12 @@ public function __construct(Mailer $mailer, Repository $config) public function send() { $this->mailer->raw($this->message, function (Message $message) { - + foreach ($this->config['to'] as $mailTo) { $message - ->subject($this->subject) - ->from($this->config['from']) - ->to($this->config['to']); + ->subject($this->subject) + ->from($this->config['from']) + ->to($mailTo); + } }); } }