|
|
|
@ -393,16 +393,26 @@ public class SnEmailGatherTask { |
|
|
|
|
buildMsg(gatherLogVo,"1","密码错误连接邮箱失败"); |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
log.error("连接邮箱异常信息{}",e); |
|
|
|
|
try { |
|
|
|
|
store.close(); |
|
|
|
|
} catch (MessagingException ex) { |
|
|
|
|
throw new RuntimeException(ex); |
|
|
|
|
} |
|
|
|
|
store = null; |
|
|
|
|
}catch(MailConnectException e){ |
|
|
|
|
buildMsg(gatherLogVo,"1","连接超时"); |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
log.error("连接邮箱异常信息{}",e); |
|
|
|
|
try { |
|
|
|
|
store.close(); |
|
|
|
|
} catch (MessagingException ex) { |
|
|
|
|
throw new RuntimeException(ex); |
|
|
|
|
} |
|
|
|
|
store = null; |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
buildMsg(gatherLogVo,"1","未知连接异常"); |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
log.error("连接邮箱异常信息{}",e); |
|
|
|
|
|
|
|
|
|
}finally { |
|
|
|
|
try { |
|
|
|
|
store.close(); |
|
|
|
|
} catch (MessagingException ex) { |
|
|
|
|