예제 #1
0
파일: Email.php 프로젝트: fucoso/site
 public function send($to, $subject, $view, $data)
 {
     if (!$this->getTheme() && !$this->provider->isReady()) {
         return false;
     }
     $this->provider->clear();
     $this->provider->setMailType('html');
     $this->provider->from('mailer@' . $this->fromDomain, $this->fromTitle);
     $this->provider->to($to);
     $this->provider->subject($subject);
     if (!array_key_exists('pageTitle', $data)) {
         $data['pageTitle'] = $subject;
     }
     $html = $this->template->view($view, $data, true);
     $this->provider->message($html);
     if ($this->provider->send()) {
         return true;
     } else {
         //return false;
         return true;
         // Patch for now, until server configutaion is good.
     }
 }
예제 #2
0
 /**
  *
  * @param CommandValue $commandValue
  * @param ITemplate $template
  * @param string $content
  * @param array $data
  */
 protected function parseSingleCommand(CommandValue $commandValue, ITemplate $template, array $data = array())
 {
     return $template->viewRaw($commandValue->getValue(), $data);
 }