$templateFile = $this->template;
$args = $this->contents;
- $content = clone($this->page);
+ $content = clone($page);
foreach((array)$args as $k=>$v) {
$content->$k = $v;
require_once 'HTML/Template/Flexy.php';
$htmlbody = false;
- $htmltemplate = new HTML_Template_Flexy( );
- if (is_string($htmltemplate->resolvePath('mail/'.$templateFile.'.body.html')) ) {
+
+ if (is_string($template->resolvePath('mail/'.$template.'.body.html')) ) {
// then we have a multi-part email...
$htmltemplate = new HTML_Template_Flexy( );
$htmltemplate->compile('mail/'. $templateFile.'.body.html');
- $htmlbody = $htmltemplate->bufferedOutputObject($content);
+ $htmlbody = $template->bufferedOutputObject($content);
// for the html body, we may want to convert the attachments to images.
}
- $a = new HTTP_Request($url);
+ $a = &new HTTP_Request($url);
$a->sendRequest();
file_put_contents($cache .'.data', $a->getResponseBody());
$ret['file'] = $cache . '.data';
return $ret;
- }
+
}
\ No newline at end of file