adwinwijaya wrote:
$message = $email->>fetch('/templates/email.tpl'); JH> mail($to,$subject,$message);
no, This is not what I mean. I know about mail() function. I just want to create email, but I want it like smarty, have if, for etc in the email template.
Yes, that is what you mean. fetch() is going to parse the smarty "email" template (where you have your IF, FOR, smarty variables, etc) and return the parsed template to you. Then you stick that into mail().
If you want to use $email->send(), then you'll have to modify the smarty class or write a class that extends smarty and implements the send() method.
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php