Free Support Forum -

Html attachment added inline

If we add a html file to a mapimessage with aspose-email 18.6 for java, the html content of the attachment is added inline. how to add the html file as attachment?

MailMessage mailMessage = new MailMessage();
MapiMessage message = MapiMessage.fromMailMessage(mailMessage);
message.getAttachments().add(attachmentFilename, getEntity().getJcrFile().getContent());“c:/temp/test.msg”);

Kind regards, Josef


It seems to be an issue with the API that has now been logged as EMAILNET-39068 for further investigation at our end. We’ll update you here once there is some information or a fix version available in this regard.

This issue is resolved but not included in Release Aspose.Email for Java 18.7? Do you fixed this in java too?


This is Outlook behavior which shows the attachment inline if message body is empty. Hence, it is not related to the API.

The issues you have found earlier (filed as EMAILNET-39068) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by muhammadahmad