xuhy
2025-04-21 2e1039b373bf2ad12f44e5fda0574cfd053b08ae
ruoyi-common/src/main/java/com/ruoyi/common/utils/TencentMailUtil.java
@@ -144,8 +144,9 @@
                messageBodyPart = new MimeBodyPart();
                String filePath = map.get("filePath");
                String fileName = map.get("fileName");
                tempFilePath.add(Paths.get(filePath));
                FileDataSource source = new FileDataSource(filePath+"\\"+fileName);
                Path path = Paths.get(filePath, fileName);
                tempFilePath.add(path);
                FileDataSource source = new FileDataSource(path.toString());
                messageBodyPart.setDataHandler(new DataHandler(source));
                // String filenameEncode = MimeUtility.encodeText(fileName, "UTF-8", "base64");
                // String encodedFileName = Base64.getEncoder().encodeToString(fileName.getBytes(StandardCharsets.UTF_8));