File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/main/java/org/simplejavamail/converter/internal/mimemessage Expand file tree Collapse file tree 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)
209209 }
210210 } else {
211211 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
213213 if (part .getDisposition () == null || Part .ATTACHMENT .equalsIgnoreCase (part .getDisposition ())) {
214214 this .attachmentList .put (parseResourceName (part .getContentID (), part .getFileName ()), ds );
215215 } 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+ }
217222 } else {
218223 throw new IllegalStateException ("invalid attachment type" );
219224 }
You can’t perform that action at this time.
0 commit comments