Hi
I am using 2 vLibTemplates and vLibMimeMail in the same page.
The first vLibTemplate object called $tpl is used to display a page. The second vLibTemplate object $mailtpl is used to grab contents of template file and pass as contents to $email (vLibMimeMail).
The structure looks something like that:
$tpl = new vLibTemplate'page.tpl';
$mailtpl = new vLibTemplate'mail.tpl';
...
if somecond
$email = new vLibMimeMail;
$email-to'[email protected]';
...
$contents = $mailtpl-grab;
$email-htmlbody = $contents;
$email-send;
$tpl-pparse;
I have the following problem with this implementation.
The
$contents = $mailtpl-grab
actually displays email and then program fails on $email->send() because $contents is empty (Fatal error: vlibMimeMail error: Tried to send a message with no body. in c:apachehtdocslibvlibMimeMailerror.php on line 55).
Does any one know of why this happens or if vLibTemplate uses some temp file for parsing that can be accessed by both templates? Please help. I have been trying to fix it for couple of days now and see no resolution.