Re: [SMARTY] sending emails using my smarty templates
| From: | pete M | Date: | Fri, 21 Jan 2005 13:41:18 +0000 |
| Subject: | Re: [SMARTY] sending emails using my smarty templates | ||
| References: | 1 2 3 4 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-12182@lists.php.net to get a copy of this message | ||
I use Smarty with phpMailer all the time
http://phpmailer.sourceforge.net/
with the magic line
$mail->body = $smarty->fetch('email.html');
Makes life a doddle as the "designer" makes the email
pete
Jochem Maas wrote:
Abdul-Wahid Paterson wrote:Hiwhy not just fetch() the output of the template and stick that in a mail (using whatever mail class/function/wrapper you have/use) rather than display()ing the output?- Maybe you can mail out the URL of the web page instead of the page itself.I wish I could, but alas, I have to follow a written specification. Not up to me :( Anyway, I have made some progress. I created a separate template for the email with some modifications to the structure (e.g. removing javascript and dynamic menus etc.) and have an output filter and capture the HTML to send as an email. I have nearly got there.thanks to all for your advice. Abdul-Wahid