|
Posted by Bernhard Jaud on 12/16/60 11:58
_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('email.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
[Back to original message]
|