发送邮件失败异常拦截

This commit is contained in:
shibanglin 2023-03-07 11:33:18 +08:00
parent 0f536fb337
commit 5a71ba7c62

View File

@ -72,7 +72,11 @@ public class MailOtpAuthn extends AbstractOtpAuthn {
messageTemplate,userInfo.getUsername(),token,(interval / 60)));
email.addTo(userInfo.getEmail());
email.send();
try {
email.send();
}catch (Exception e){
e.printStackTrace();
}
_logger.debug(
"token " + token + " send to user " + userInfo.getUsername()
+ ", email " + userInfo.getEmail());