_mario.lat schrieb:
Hallo,
I'd like to use the power of Smarty for writing an e-mail.
I mean: I have some field (or variables) and I like to create a template
of an e-mail which can be modified simply modifing the code...
like a web page whith its template.
How can I do?
Thank you in advance,
Mario.
Write your template e.g. email.tpl
Assign the vars
$tpl -assign('Name', $name);
and fetch the Finished Template into a variable
$body=$tpl -fetch('post_view.tpl');
and then mail it
mail($to,$subject,$body);
HTH
Bernhard
--
Some humans would do anything to see if it is possible to do it.
If you would place a lager switch in some cave somewhere,
saying "END-OF-THE-WORLD-SWITCH!! DO NOT TOUCH!!!",
the paint wouldnt have time to dry.
-Terry Pratchett