moving report part from send mail function to create report function