fix 修改邮箱密码为邮箱授权码

This commit is contained in:
lijiarao
2021-11-26 14:04:46 +08:00
parent fbb62b689c
commit b4b28d59a1
4 changed files with 13 additions and 13 deletions
@@ -108,7 +108,7 @@ public class SendMessageServiceImpl implements SendMessageService {
try {
String email = loginUser.getEmail();
String emailPassword = loginUser.getEmailPassword();
//如果发件人没有邮箱或邮箱密码则使用admin账户的邮箱密码
//如果发件人没有邮箱或邮箱授权码则使用admin账户的邮箱授权码
if (StringUtils.isBlank(email) || StringUtils.isBlank(emailPassword)) {
loginUser = sysBaseAPI.getUserByName(env.getProperty("message.systemEmailUser"));
email = loginUser.getEmail();
@@ -132,7 +132,7 @@ public class SendMessageServiceImpl implements SendMessageService {
log.error("发送邮件异常",e);
if (e.getMessage() !=null){
if (e.getMessage().contains("javax.mail.AuthenticationFailedException")){
throw new JeroBootException("邮件发送失败,发件人的邮箱或邮箱密码错误!");
throw new JeroBootException("邮件发送失败,发件人的邮箱或邮箱授权码错误!");
}else if (e.getMessage().contains("java.net.ConnectException")){
throw new JeroBootException("邮件发送失败,邮箱服务器连接超时!");
}else {
@@ -503,7 +503,7 @@ public class SendMessageServiceImpl implements SendMessageService {
try {
String email = loginUser.getEmail();
String emailPassword = loginUser.getEmailPassword();
//如果发件人没有邮箱或邮箱密码则使用admin账户的邮箱密码
//如果发件人没有邮箱或邮箱授权码则使用admin账户的邮箱授权码
if (StringUtils.isBlank(email) || StringUtils.isBlank(emailPassword)) {
loginUser = sysBaseAPI.getUserByName(env.getProperty("message.systemEmailUser"));
email = loginUser.getEmail();