优化邮件发送失败处理

This commit is contained in:
wanjia 2022-08-12 14:24:39 +08:00
parent 4210e4843b
commit a7c8fc105f
1 changed files with 1 additions and 0 deletions

View File

@ -96,6 +96,7 @@ public class EmailService {
unSentEmailSendRecord.setSentAt(new Date());
unSentEmailSendRecord.setStatus(flag ? NotificationSystemConstant.EMAIL_SENT_SUCCESS : NotificationSystemConstant.EMAIL_SENT_FAIL);
} catch (Exception e) {
unSentEmailSendRecord.setStatus(NotificationSystemConstant.EMAIL_SENT_FAIL);
logger.error("发送邮件失败email: " + unSentEmailSendRecord.getEmail() + "\n" + e);
}
}