I have a project running PHPRunner v4.2 that utilizes the $smarty->fetch function to load a template and send it as the body of an email message. The snippet of code that accomplished this was:
mail($emailto, $emailsubject, $smarty->fetch('new_CR.htm'), $headers );
This worked great, resulting in an email being sent to the recipient specified by $emailto, with the body of the email message containing the correctly formatted html, as specified by the 'new_CR.htm' template.
I am now in the process of upgrading my project to v5.0, which utilizes the $xt class. I thought it would be a simple matter of substituting an equivalent XT function to get the template to insert into the body of the email message. I've tried different functions, including the following, but I cannot get the template to populate the body of the email message. The $xt->display function only causes the template to display on the browser page. The email message gets sent, but the body of the email is blank.
mail($emailto, $emailsubject, $xt->display('new_CR.htm'), $headers );
Any ideas?