xuhy
2025-04-10 2eb2ba547d0c0087b4619033db9f0d2a0cff0b06
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));