generates a temporary csv file and send mail