lock emaildetail table before commencing mail batch run