updates to mail script