/** * builds the email template * @return MessageBuilder */ public function buildMessageForBuyer($download = false) { $subjectKey = $download ? 'DOWNLOAD_GUIDE' : 'PURCHASED_GUIDE'; $templating = $this->messageBuilder->getTemplating(); $router = $this->messageBuilder->getRouter(); $link = $router->generate('local_author_payments_purchased', array(), true); $params = array('link' => $link); $to = $this->purchaseInfo->getBuyer()->getEmail(); $body = $templating->render('BugglMainBundle:Notification:purchasedGuide.html.twig', $params); $this->messageBuilder->buildMessage($subjectKey, $to, $body); return $this; }
public function buildMessageForAdmin($download = false) { $subjectKey = 'REQUEST_GUIDE'; $templating = $this->messageBuilder->getTemplating(); $router = $this->messageBuilder->getRouter(); $link = $router->generate('local_author_payments_purchased', array(), true); $params = array('link' => $link, 'email' => $this->purchaseInfo->getBuyer()->getEmail(), 'selleremail' => $this->purchaseInfo->getSeller()->getEmail(), 'sellername' => $this->purchaseInfo->getSeller()->getName(), 'buyername' => $this->purchaseInfo->getBuyer()->getName()); $bodyadmin = $templating->render('BugglMainBundle:Notification:purchaseInfoItinerary.html.twig', $params); $this->messageBuilder->buildMessage('Custom Itinerary Is Ready', '*****@*****.**', $bodyadmin); //$this->messageBuilder->buildMessage('Custom Itinerary Is Ready','*****@*****.**', $bodyadmin); return $this; }