| | |
| | | messageBodyPart = new MimeBodyPart(); |
| | | String filePath = map.get("filePath"); |
| | | String fileName = map.get("fileName"); |
| | | tempFilePath.add(Paths.get(filePath,fileName)); |
| | | 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)); |