| | |
| | | map.put("smtpPort", emailEntity.getSmtpPort()); |
| | | map.put("proxyFlag", emailEntity.isProxyFlag()); |
| | | map.put("biSyncFlag", emailEntity.isBiSyncFlag()); |
| | | map.put("mailStatus", emailEntity.getMailStatus()); |
| | | map.put("mailStatus", "正常"); |
| | | msg.setSuccess("执行成功", map); |
| | | } else { |
| | | //异常处理 |
| | |
| | | folder.close(false); |
| | | store.close(); |
| | | |
| | | |
| | | // Session mailSession = Session.getInstance(props, new Authenticator() { |
| | | // @Override |
| | | // protected PasswordAuthentication getPasswordAuthentication() { |
| | | // return new PasswordAuthentication(emailEntity.getEmail(), emailEntity.getPassword()); |
| | | // } |
| | | // }); |
| | | Transport transport = session.getTransport(); |
| | | transport.connect(); |
| | | transport.close(); |
| | | |
| | | mailAccountIfc.updateMailStatus("正常", emailEntity.getAccountId()); |
| | | } catch (MessagingException e) { |
| | | errorMsg = e.getCause() != null ? e.getCause().getMessage() : e.getMessage(); |
| | | } catch (Exception e) { |