You are here: Re: how to use Smarty to write a text (ex. an e-mail)? « PHP Programming Language « IT news, forums, messages
Re: how to use Smarty to write a text (ex. an e-mail)?

Posted by Bernhard Jaud on 10/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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация