sendEmail now requires a seperate file for it to operate