Re: [SMARTY] sending emails using my smarty templates

From: Date: Sat, 22 Jan 2005 03:59:17 +0000
Subject: Re: [SMARTY] sending emails using my smarty templates
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12195@lists.php.net to get a copy of this message
Abdul-Wahid Paterson wrote:
I will try out the DOM functions. They do look quite cool. In the meantime I found this....
cool
// new parser object $parser = new HtmlParser($html); // parse the page looking for <img> tags while($parser->parse()) {
    if(strtolower($parser->iNodeName) == strtolower('img')) {
      foreach($parser->iNodeAttributes as $key => $value) {
if(strtolower($key) == strtolowr('src')) {
second strtolower() is a waste in each case above.
           // add the image
$mime->addHTMLImage($key); }
      }
    }
} $mime->setHTMLBody($html); $body = $mime->get(); $hdrs = $mime->headers($hdrs); $mail =& Mail::factory('mail'); $mail->send('foo@bar.com', $hdrs, $body);
...

« previous php.smarty.general (#12195) next »