/** * 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; }
public static function embed_img($args, $attributes = null) { $cid = \Hook\View\MailHelper::embed($args); return array('<img src="' . $cid . '"' . html_attributes($attributes) . ' />', 'raw'); }