Compile email template on demand

Previously the middleware dump included the compiled email template.
This should help make the email less verbose.