change images source in emails to base64
(cherry picked from commit b94aa51489
)
This commit is contained in:
parent
c39c162979
commit
78946de1b5
|
@ -108,7 +108,10 @@ public class MailServiceImpl implements MailService {
|
||||||
lastIndex = content.indexOf("img src=\"", lastIndex);
|
lastIndex = content.indexOf("img src=\"", lastIndex);
|
||||||
|
|
||||||
if (lastIndex != -1) {
|
if (lastIndex != -1) {
|
||||||
imagePaths.add(content.substring(lastIndex + 9, content.indexOf("\"", lastIndex + 9)));
|
String imagePath = content.substring(lastIndex + 9, content.indexOf("\"", lastIndex + 9));
|
||||||
|
if (!imagePath.contains("data:image/png;base64")) {
|
||||||
|
imagePaths.add(imagePath);
|
||||||
|
}
|
||||||
lastIndex++;
|
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