Skip to content

Commit

Permalink
MailSender: $email can contain multiple addresses [Closes #308]
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Jun 28, 2018
1 parent eeb7e9d commit 7f3e1c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Bridges/Nette/MailSender.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ public function send($message, $email)
$mail = new Nette\Mail\Message;
$mail->setHeader('X-Mailer', 'Tracy');
$mail->setFrom($this->fromEmail ?: "noreply@$host");
$mail->addTo($email);
foreach (explode(',', $email) as $item) {
$mail->addTo(trim($item));
}
$mail->setSubject('PHP: An error occurred on the server ' . $host);
$mail->setBody(static::formatMessage($message) . "\n\nsource: " . Helpers::getSource());

Expand Down

0 comments on commit 7f3e1c4

Please sign in to comment.