Java.desktop does not export com.sun.imageio.plugins.jpeg in unnamed module

This Java error is returned when calling MapiMessage.fromStream(…)
Aspose Email ver 22.4 for java (code snippet is using Groovy):
I see a similar case in your Forum for SLIDESJAVA-38563.

MailMessage msg = MailMessage.load(msgFile.absolutePath);
def jMsgStm = msg.attachments.get_Item(0)
if (!jMsgStm) {
println "Get Attachment Fail"
} else {
if (jMsgStm.contentType == 'message/rfc822') {
def innerEmail = MapiMessage.fromStream(jMsgStm.getContentStream())
if (innerEmail.headers['X-MS-Journal-Report'] != null) {

image.jpg (229.0 KB)

@mbeedell,

The com.sun.imageio dependency issue has been fixed in 22.5 Aspose.Email for Java release(com.sun.imageio dependency removed from lib).
Could you check the issue with Aspose.Email release 22.5 or higher?

Thank you. That solved the issue. :slightly_smiling_face:

Thank you for writing to Aspose.Email support.

If you have any other questions, please feel free to ask.