Skip to content

Commit cee5b13

Browse files
Marvin Rohrbachbbottema
Marvin Rohrbach
authored andcommitted
Add fallback handling
1 parent 2e56b57 commit cee5b13

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/org/simplejavamail/outlookmessageparser/model/OutlookMessage.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,11 @@ public Map<String, OutlookFileAttachment> fetchCIDMap() {
313313
for (final OutlookAttachment attachment : getOutlookAttachments()) {
314314
if (attachment instanceof OutlookFileAttachment) {
315315
final OutlookFileAttachment fileAttachment = (OutlookFileAttachment) attachment;
316-
tryAddCid(cidMap, html, fileAttachment, fileAttachment.getContentId());
316+
if (!tryAddCid(cidMap, html, fileAttachment, fileAttachment.getContentId())) {
317+
if (!tryAddCid(cidMap, html, fileAttachment, fileAttachment.getFilename())) {
318+
tryAddCid(cidMap, html, fileAttachment, fileAttachment.getLongFilename());
319+
}
320+
}
317321
}
318322
}
319323
}

0 commit comments

Comments
 (0)