File tree 1 file changed +7
-2
lines changed
src/main/java/org/simplejavamail/converter/internal/mimemessage
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -209,11 +209,16 @@ private void parse(final MimePart part)
209
209
}
210
210
} else {
211
211
final DataSource ds = createDataSource (part );
212
- // If the diposition is not provided, the part should be treat as attachment
212
+ // If the diposition is not provided, the part should be treated as attachment
213
213
if (part .getDisposition () == null || Part .ATTACHMENT .equalsIgnoreCase (part .getDisposition ())) {
214
214
this .attachmentList .put (parseResourceName (part .getContentID (), part .getFileName ()), ds );
215
215
} else if (Part .INLINE .equalsIgnoreCase (part .getDisposition ())) {
216
- this .cidMap .put (part .getContentID (), ds );
216
+ if (part .getContentID () != null ) {
217
+ this .cidMap .put (part .getContentID (), ds );
218
+ } else {
219
+ // contentID missing -> treat as standard attachment
220
+ this .attachmentList .put (parseResourceName (null , part .getFileName ()), ds );
221
+ }
217
222
} else {
218
223
throw new IllegalStateException ("invalid attachment type" );
219
224
}
You can’t perform that action at this time.
0 commit comments