Esempio n. 1
0
 /**
  * Create a new Message.
  *
  * @param string $template_body path or data to be attached
  * @param string $options
  *
  * @return Swift_Mime_Attachment
  */
 public static function message($template_body = null, $options = array())
 {
     $message = new Message();
     MailHelper::setMessage($message);
     if ($template_body) {
         $template = Module::template($template_body);
         $message->body($template->compile($options));
     }
     return $message;
 }
Esempio n. 2
0
 public static function embed_img($args, $attributes = null)
 {
     $cid = \Hook\View\MailHelper::embed($args);
     return array('<img src="' . $cid . '"' . html_attributes($attributes) . ' />', 'raw');
 }