fixed bug in send_job_email