send email if there are errors.