fix the sending mail process