示例#1
0
 /**
  * Build (return) the email template, will return false if the file is
  * not found
  * 
  * @param string $view
  * @return string|bool Email template text or false when file is not found
  */
 public function build($view, $content)
 {
     $CI =& get_instance();
     # Change the theme to the frontend theme to get the email template contents.
     $CI->template->set_theme(PAN::setting('theme'));
     $CI->_theme_path = $CI->template->get_theme_path();
     $file_location = $CI->_theme_path . 'views/emails/' . $view . '.php';
     if (file_exists($file_location)) {
         $email_content = file_get_contents($file_location);
         $email_content = Email_Template::parse_text($email_content, array('content' => $content));
         # Change the theme back to the admin theme to keep things running smoothly.
         $CI->template->set_theme('admin/' . PAN::setting('admin_theme'));
         return $email_content;
     } else {
         show_error('Could not send the email. ' . $file_location . ' does not exist.');
         return false;
     }
 }
示例#2
0
 function __construct($nlType)
 {
     $this->nlType = $nlType;
     parent::__construct();
 }
示例#3
0
 function __construct($values)
 {
     $this->subject = _t('UserDefinedForm_SubmittedFormEmail.EMAILSUBJECT', 'Submission of form');
     parent::__construct();
     $this->data = $values;
 }