change images source in emails to base64
This commit is contained in:
parent
903026e2c2
commit
b94aa51489
|
@ -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
Loading…
Reference in New Issue