Re: [SMARTY] send temlate-output as mail?
| From: | M Mohr | Date: | Fri, 10 Jan 2003 17:22:51 +0000 |
| Subject: | Re: [SMARTY] send temlate-output as mail? | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-7117@lists.php.net to get a copy of this message | ||
On Fri, Jan 10, 2003 at 06:00:39PM +0100, akorthaus@web.de wrote:
> Hi!
>
> I often have emails to send in my PHP-pages, but I always want to use
> variables in it, like $name, ..., or I use loops, to generate some lines
> from database(orders...).
>
> Is it possilble to use smarty also for these mails, I think about the same
> usage as HTML-templates, but without sending the output to a browser, it
> should be send per e-mail.
> Does someone know a possibility to do this, or what else to do with my
> personalized mails?
try something like
mail($to, $subject, $smarty->fetch('mail.tpl'));
have fun
messju
> Thank You!
>
> regards
> Andreas
>
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php