예제 #1
0
파일: Mail.php 프로젝트: CFLOVEYR/hook
 /**
  * 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;
 }
예제 #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');
 }