优化邮件发送功能

This commit is contained in:
gy b
2023-10-15 23:04:41 +08:00
parent df8ed662e8
commit 5fa3e4b735
3 changed files with 97 additions and 20 deletions
@@ -371,19 +371,16 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
if (caseAttach.getAnnexType() == 3) {
String annexPath = caseAttach.getAnnexPath();
String path = "/home/ruoyi/" + annexPath;
// String path = "/home/ruoyi/uploadPath/upload/2023/10/12/裁决书测试20231012test.docx";
// String path = "E:/WorkDoc/SH/裁决书测试20231012test.docx";
file = new File(path);
fileList.add(file);
System.out.println("文件长度:" + file.length());
System.out.println("文件长度==================:" + file.length());
}
}
}
if (file != null) {
JavaMailSender javaMailSender = emailOutUtil.rebuildMailSender();
try {
// emailOutUtil.sendMessageCarryFile(appEmail, "裁决书", "您好,审核后的裁决书在附件中请查阅", file, "hjbjava@163.com", javaMailSender);
emailOutUtil.sendMessageCarryFiles(appEmail, "裁决书", "您好,审核后的裁决书在附件中请查阅", fileList, "lmj1549843951@163.com", javaMailSender);
emailOutUtil.sendEmil(appEmail, "您好,审核后的裁决书在附件中请查阅", "签署后的裁决书", fileList, null);
emailOutUtil.sendEmil(resEmail, "您好,审核后的裁决书在附件中请查阅", "签署后的裁决书", fileList, null);
} catch (Exception e) {
System.out.println("邮件发送失败++++++++++++++++++++++++++++++++");
System.out.println(e.toString());