fix 处理邮件发送失败
This commit is contained in:
+3
-2
@@ -127,9 +127,10 @@ public class SendMessageServiceImpl implements SendMessageService {
|
||||
if (e.getMessage() !=null){
|
||||
if (e.getMessage().contains("javax.mail.AuthenticationFailedException")){
|
||||
throw new JeroBootException("邮件发送失败,发件人的邮箱或邮箱密码错误!");
|
||||
}
|
||||
if (e.getMessage().contains("java.net.ConnectException")){
|
||||
}else if (e.getMessage().contains("java.net.ConnectException")){
|
||||
throw new JeroBootException("邮件发送失败,邮箱服务器连接超时!");
|
||||
}else {
|
||||
throw new JeroBootException("邮件发送失败!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user