fix a bug about sending email