示例#1
0
 /**
  * @param string $from
  * @param string $to
  * @param string $subject
  * @param string $link
  */
 private function sendEmail($from, $to, $subject, $link)
 {
     $latte = new Latte\Engine();
     $parameters = array('subject' => $subject, 'link' => $link, 'baseUri' => $this->urlScript->getHostUrl(), 'host' => $this->urlScript->getHost());
     $email = new Message();
     $email->setFrom($from)->addTo($to)->setSubject($subject)->setHtmlBody($latte->renderToString($this->appDir . '/presenters/templates/emails/registration.latte', $parameters));
     $this->mailer->send($email);
 }
示例#2
0
 public function __construct(Nette\Application\IRouter $router, Nette\Http\IRequest $httpRequest)
 {
     $this->router = $router;
     $this->refUrl = $httpRequest->getUrl();
     $this->refUrlHost = $this->refUrl->getHostUrl();
 }