Closed piu130 closed 9 months ago
This bug is reported in the wrong project (it should be https://github.com/bbottema/simple-java-mail/), but I'll have a look anyway.
The problem is not missing images one device or another, the problem is the email is malformed. It contains an attachment with a cid.key
(used for embedded images) for which the image data is missing (not empty, but missing). I'll see what I can do about making the parser more tolerant.
I've made the parser ignore attachments with missing data and released outlook-message-parser:1.11.0.
In your project where you use Simple Java Mail, can you please include the following and see if it fixes your problem?
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.simplejavamail</groupId>
<artifactId>outlook-message-parser</artifactId>
<version>1.11.0</version>
</dependency>
</dependencies>
</dependencyManagement>
If this fixes your problem, I'll release a new version of Simple Java Mail as well.
It works with version 1.11.0. As always, thank you very much for the fast support and the detailed explanation :)
I'm going to revert this change. It breaks the fix for https://github.com/bbottema/simple-java-mail/issues/318. I'll have to think of something else. Sorry, I should've checked this first myself.
Released 1.11.1, which fixes it as well but doesn't cause issues for normal attachments.
simple-java-mail:8.3.4 released with this fix.
When parsing an msg with an empty embedded image, the parser throws
IllegalArgumentException: data is required
.We have several of those errors and the files are mostly called
com_samsung_android_email_attachmentprovider_...
. Those images are in the signature. Maybe the signature references images on the senders main device which are not available on the secondary device?Anyway, it would be good if the parser would not fail for empty embedded files.
Sample:
Stacktrace (v 8.3.3):