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 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 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 ; }
Create a new Message.

@param string $template_body path or data to be attached
@param string $options

@return Swift_Mime_Attachment
Create a new Message .