Skip to content
Viliam Kopecký edited this page Jul 1, 2016 · 3 revisions

Email templates

In theme/emailsshould be your email templates. There is some basic layout @email.latte which you can extend. Just create a new Latte template (like hello.latte), and then you can get Nette\Mail\Message by calling $message = makeEmail('hello', [...parameters]). And then send the message as sendEmail($message, 'to@example.com').

// will load template theme/emails/hello.latte
$message = makeEmail('hello', [ 'name' => 'John Doe']);

sendEmail($message, 'you@example.com');
Clone this wiki locally