I am trying to generate an email with some HTML that is created via another PHP file.
Email generating file is run by a cron running every hour. Another file exists that
Check out the built-in functions ob_start and ob_get_clean.
You can then do something like:
ob_start(); include( "file.php"); $var = ob_get_clean();