Fix email send failure issue