so rather than have the Power CMS and database include files on the em ail template page, they should be on the page you apply UE to.
also, same holds true for the recordset, that should also be on the page you apply UE to.
on the email template, add globals for the database and recordset variables:
so add the following code at line 1:
remove the recordset and all the require once lines from the template, and make sure they are defined on the page that UE is applied to.