解析的html内容单独放置于一个字段

This commit is contained in:
wind 2023-09-19 16:11:30 +08:00
parent c1a4482797
commit e7c7655e31
2 changed files with 4 additions and 1 deletions

View File

@ -20,6 +20,9 @@ public class MonitorMessage {
/** 邮件文字内容*/
private String text;
/** 解析的html内容*/
private String htmlText;
/** 邮件发送时间*/
private Date sendDate;

View File

@ -79,7 +79,7 @@ public class MonitorService{
monitorMessage.setText(bodyPart.getContent().toString());
} else if (contentType.startsWith("text/html")) {
// HTML内容
monitorMessage.setText(bodyPart.getContent().toString());
monitorMessage.setHtmlText(bodyPart.getContent().toString());
}
}
monitorMessage.setBody(mp);