Attaches a CSV report to the email.
Removed some testing code.