/** * @param Pool $pool */ public function sendAllWishlistsToAdmin(Pool $pool) { $this->translator->setLocale($pool->getLocale()); $this->mailer->send(\Swift_Message::newInstance()->setSubject($this->translator->trans('emails.admin_wishlists.subject'))->setFrom($this->adminEmail, $this->translator->trans('emails.sender'))->setTo($pool->getOwnerEmail(), $pool->getOwnerName())->setBody($this->templating->render('IntractoSecretSantaBundle:Emails:admin_wishlists.html.twig', ['pool' => $pool]), 'text/html')->addPart($this->templating->render('IntractoSecretSantaBundle:Emails:admin_wishlists.txt.twig', ['pool' => $pool]), 'text/plain')); }
private function sendPendingConfirmationMail(Pool $pool) { $this->translator->setLocale($pool->getLocale()); $message = \Swift_Message::newInstance()->setSubject($this->translator->trans('emails.pendingconfirmation.subject'))->setFrom($this->adminEmail, $this->translator->trans('emails.sender'))->setTo($pool->getOwnerEmail())->setBody($this->templating->render('IntractoSecretSantaBundle:Emails:pendingconfirmation.txt.twig', array('pool' => $pool)))->addPart($this->templating->render('IntractoSecretSantaBundle:Emails:pendingconfirmation.html.twig', array('pool' => $pool)), 'text/html'); $this->mailer->send($message); }