$tops['templateDir'] = $args['templateDir'];
}
- require_once 'HTML/Template/Flexy.php';
- $template = new HTML_Template_Flexy( $tops );
-
-
+ require_once 'HTML/Template/Flexy.php';
+ $template = new HTML_Template_Flexy( $tops );
$template->compile("mail/$templateFile.txt");
/* use variables from this object to ouput data. */
$mailtext = $template->bufferedOutputObject($content);
+
+ // if a html file with the same name exists, use that as the body
+ // I've no idea where this code went, it was here before..
+ if (false !== $template->resolvePath ( "mail/$templateFile.html" )) {
+ $tops['nonHTML'] = false;
+ $template = new HTML_Template_Flexy( $tops );
+ $template->compile("mail/$templateFile.html");
+
+ $htmlbody = $template->bufferedOutputObject($content);
+
+
+ }
+
+
+
//echo "<PRE>";print_R($mailtext);
//print_R($mailtext);exit;
/* With the output try and send an email, using a few tricks in Mail_MimeDecode. */