fix a bug of mail sending