Writing email, working on the report creation function