<html><head><metahttp-equiv="Content-Type"content="text/html; charset=utf-8"><title>Registro</title></head><body><p>Hola {$username},</p><p>Para activar tu cuenta por favor haz click en <ahref="{$auth_key_link}">este enlace</a> .</p><p>Para activar tu cuenta por favor haz click en <an:href="//Homepage:validate hash => $auth_key">este enlace</a> .</p><p>Gracias y bienvenido a {$site_title}</p></body></html>
… because you completely exclude parameters already defined in $emailLatte
(including _control).
Correct approach should be:
// obtain configured instance of Latte Template:$template=clone$presenter->getTemplate();// set custom source file (without this, it would use presenter's current action's template file)$template->setFile(__DIR__.'/../../templates/yourEmailMessageTemplateFile.latte');// add your custom parameters at once:$template->setParameters($this->params);// or one by one:$template->foo='foo';$template->bar='bar';// create the email message object:$message=newNette\Mail\Message;// optionally add message object to template to allow its manipulation from within the template file:$template->mail=$message;// prepare the email message:$message->setFrom($fromEmail/* , $fromName*/)->addTo($targetEmail/* , $targetName*/)->setHtmlBody((string)$template)->setSubject($subject);// optional, will be set by setHtmlBody if <title>Subject</title> is found in the template file// send the message:$mailer->send($message);