Since RUNTIME-650, CSS is inlined when sending a mail with SendMailHelper. Extract:
String[] selector = selectors.split(","); for (String s : selector) { if (StringUtils.isNotEmpty(s) && !s.contains(":")) { Elements selectedElements = doc.select(s); for (Element selElem : selectedElements) { String oldProperties = selElem.attr("style"); selElem.attr("style", oldProperties.length() > 0 ? concatenateProperties(oldProperties, properties) : properties); } } }
Instead of testing if the selector is not empty, we should test if it's not blank
Additionally, the doc.select(s) statement can throw RuntimeExceptions. We should either:
- throw Exception specifically in SendMailHelper functions to enforce the callers catch these exceptions
- explain this in the javadoc
- catch RuntimeException in the block and ignore it or copy the css "as-is".
- Conditionne
-
CMS-4501 In the CSS properties {bgcolor} block the sending of the newsletter
-
- Closed
-