|
|
|
|
|
|
|
|
foreach ($users as $user) { |
|
|
foreach ($users as $user) { |
|
|
$message = new \Swift_Message('[Place du Local] '.$news->getTitle()); |
|
|
$message = new \Swift_Message('[Place du Local] '.$news->getTitle()); |
|
|
$message->addTo($user->getEmail()) |
|
|
$message->addTo($user->getEmail()) |
|
|
->addFrom('no-reply@opendistrib.net', 'Place du Local') |
|
|
|
|
|
|
|
|
->addFrom($this->getParameter('app.noreply_email'), $this->getParameter('app.site_name')) |
|
|
->setBody($this->renderView('mail/news.html.twig', [ |
|
|
->setBody($this->renderView('mail/news.html.twig', [ |
|
|
'message' => $news->getDescription(), |
|
|
'message' => $news->getDescription(), |
|
|
'image' => $news->getImage(), |
|
|
'image' => $news->getImage(), |