public function send_mail() { $tmpl = Template::mail('example.php'); $tmpl->replace(array( 'name' => 'John Smith' )); Sendmail::send(array( 'to' => '*****@*****.**', 'subject' => 'Hello new user!', 'body' => $tmpl->render() )); }