change images source in emails to base64

(cherry picked from commit b94aa51489)
This commit is contained in:
Bernaldo Mihasi 2023-08-03 11:19:33 +03:00 committed by Diamantis Tziotzios
parent c39c162979
commit 78946de1b5
4 changed files with 8 additions and 5 deletions

View File

@ -108,8 +108,11 @@ public class MailServiceImpl implements MailService {
lastIndex = content.indexOf("img src=\"", lastIndex);
if (lastIndex != -1) {
imagePaths.add(content.substring(lastIndex + 9, content.indexOf("\"", lastIndex + 9)));
lastIndex ++;
String imagePath = content.substring(lastIndex + 9, content.indexOf("\"", lastIndex + 9));
if (!imagePath.contains("data:image/png;base64")) {
imagePaths.add(imagePath);
}
lastIndex++;
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long