fix:1.修改获取邮件内容改为从.eml文件中获取
This commit is contained in:
parent
eae304a2f7
commit
7b2fda268d
|
@ -492,7 +492,7 @@ public class EmailServiceManager {
|
|||
* 格式为:发件人_主题_年月日_时分秒毫秒_计数(0-10000)
|
||||
* 当计数大于10000后从0开始,服务重启后也从0开始
|
||||
*/
|
||||
public void downloadEmailToEmlDir(@NotNull Message message,Integer emailCounter) throws MessagingException, IOException {
|
||||
public File downloadEmailToEmlDir(@NotNull Message message,Integer emailCounter) throws MessagingException, IOException {
|
||||
String subject = "";
|
||||
File emlFile = null;
|
||||
String status = EmailLogManager.STATUS_SUCCESS;
|
||||
|
@ -534,6 +534,8 @@ public class EmailServiceManager {
|
|||
(Objects.isNull(emlFile)?" ":emlFile.getAbsolutePath()));
|
||||
EmailLogManager.getInstance().offer(Thread.currentThread().getId(),event);
|
||||
}
|
||||
|
||||
return emlFile;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -10,6 +10,7 @@ import org.jeecg.modules.email.EmailProperties;
|
|||
import org.jeecg.modules.enums.SpectrumSource;
|
||||
import javax.mail.Message;
|
||||
import java.io.File;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
|
||||
/**
|
||||
|
@ -77,7 +78,7 @@ public class SpectrumParsingActuator implements Runnable{
|
|||
|
||||
//获取邮件内容
|
||||
StringBuilder mailContent = new StringBuilder();
|
||||
if(StringUtils.isNotBlank(emlFile.toString()) && emlFile.length() > 0){
|
||||
if(Objects.nonNull(emlFile) && emlFile.length() > 0){
|
||||
mailContent.append(FileUtil.readUtf8String(emlFile));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user