|
@@ -698,7 +698,9 @@ public class EmailParseService {
|
|
|
emailContentInfoDTO.setEmailDate(DateUtil.format(sendDate, DateConst.YYYY_MM_DD_HH_MM_SS));
|
|
|
emailContentInfoDTOList.add(emailContentInfoDTO);
|
|
|
} else {
|
|
|
- log.info("邮件{} 没有附件(fileName={},disposition={}),下载不了附件内容!", subject, fileName, disposition);
|
|
|
+ if (log.isInfoEnabled()) {
|
|
|
+ log.info("邮件{} 没有附件(fileName={},disposition={}),下载不了附件内容!", subject, fileName, disposition);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -706,7 +708,14 @@ public class EmailParseService {
|
|
|
List<EmailContentInfoDTO> emailContentInfoDTOList) throws Exception {
|
|
|
for (int i = 0; i < multipart.getCount(); i++) {
|
|
|
Part bodyPart = multipart.getBodyPart(i);
|
|
|
- if (bodyPart.getContent() instanceof Multipart mp) {
|
|
|
+ Object content = bodyPart.getContent();
|
|
|
+ if (content instanceof String) {
|
|
|
+ if (log.isDebugEnabled()) {
|
|
|
+ log.debug("邮件{} 获取的正文不做解析,内容是 {}", subject, content);
|
|
|
+ }
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if (content instanceof Multipart mp) {
|
|
|
this.reMultipart(account, subject, emailDate, mp, emailContentInfoDTOList);
|
|
|
} else {
|
|
|
this.rePart(account, subject, emailDate, bodyPart, emailContentInfoDTOList);
|