Well I hope to get a reply to resolve the issue. Creating the email on the page from which it is to be sent includes way too much junk from the page's template and invariably breaks. I have not been able to get a database connection or a framework include with a database connection from either sending the email through a clean file (no page template), or an email template.
I resolved the problem through straight PHP getting the contents of the file and pulling out just the BODY content out of it. I put this code in an email template and it works.
$file = file_get_contents("http://".$_SERVER['SERVER_NAME']."/path/to/file/invoice.php?key=".$_SESSION['key']);
$body = preg_replace("/.*<body[^>]*>|<\/body>.*/si", "", $file);