Exemplo n.º 1
0
 /**
  * Standart send any email allowed in lookuptable and exists
  * 
  * @param string $template
  * @param array $variables
  * @return boolean
  */
 public function __call($template, $variables = array())
 {
     $output = false;
     $templates = $this->config->lt('allowedTemplates.email');
     if (in_array($template, $templates)) {
         if (!empty($this->title) && !isset($variables['title'])) {
             $variables['title'] = $this->title;
         }
         $content = View::renderElement('email/' . $template, $variables, true);
         if (!empty($content)) {
             $output = $this->send($content);
         }
     }
     return $output;
 }