File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/main/java/org/simplejavamail/converter/internal/mimemessage Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -448,10 +448,11 @@ public static String parseMessageId(@Nonnull final MimeMessage mimeMessage) {
448448 }
449449
450450 private static void moveInvalidEmbeddedResourcesToAttachments (ParsedMimeMessageComponents parsedComponents ) {
451- final String htmlContent = parsedComponents .htmlContent . toString () ;
451+ final String htmlContent = parsedComponents .htmlContent ;
452452 for (Map .Entry <String , DataSource > cidEntry : parsedComponents .cidMap .entrySet ()) {
453- if (!htmlContent .contains ("cid:" + extractCID (cidEntry .getKey ()))) {
454- parsedComponents .attachmentList .put (cidEntry .getKey (), cidEntry .getValue ());
453+ String cid = extractCID (cidEntry .getKey ());
454+ if (htmlContent == null || !htmlContent .contains ("cid:" + cid )) {
455+ parsedComponents .attachmentList .put (cid , cidEntry .getValue ());
455456 parsedComponents .cidMap .remove (cidEntry .getKey ());
456457 }
457458 }
You can’t perform that action at this time.
0 commit comments