Use $template->createMessage instead