Smarty way to do email
| From: | Darryl Bleau | Date: | Mon, 13 Jan 2003 19:09:43 +0000 |
| Subject: | Smarty way to do email | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-7142@lists.php.net to get a copy of this message | ||
I'm sure I read this someplace when I was researching Smarty, but try as hard as I can I
can't find it. Maybe I was dreaming. Anyway, I'm pretty sure there is a 'Smarty'
way to send email (as in, template based) but I can't remember or figure out how. I want to do
something like this:
<?php
(...code leading up to this...)
$smart_subject = magic_smarty_function("email_subject.tpl");
$smart_email = magic_smarty_function("email_body.tpl");
$smart_from = magic_smarty_function("email_from.tpl");
mail($email_address, $smart_subject, $message, $smart_from);
(...more code...)
?>
Where the templates would look something like:
<email_subject.tpl>
{config_load file="site.cfg" section="email"}
Please verify your {#siteName#} membership.
I'm sure you know what I mean. How can I do this? It seems that it should be so simple.. and
I'm sure I'm missing something.
Darryl Bleau, B.Sc CS
Creative Director
Submersion Corporation