Embedded Objects in pst

Hello,

is the number of embedded objects of a mail limited when using the test license?
I can see all embedded ojbects in the mail message, but after adding
the mail message to the pst file I only see three embedded images.

Thanks,
Jan

Hi Jan,


Thank you for contacting Aspose support team.

A 30-day temporary license doesn’t impose any evaluation limitations on the functionality of the API and you can test the API with all the functionality. In addition. I could not locate this limitation in our online documentation as can be seen in the Evaluate Aspose.Email article. Could you please share your sample message here for our kind reference so that we can investigate the issue further? We’ll look into it and assist you accordingly.

Hi,

I have created the message with the following example code:

MailMessage mailMsg = new MailMessage();
mailMsg.setFrom(new MailAddress("from@domain.com"));
MailAddressCollection addressCol = new MailAddressCollection();
addressCol.addMailAddress(new MailAddress("to@domain.com"));
mailMsg.setTo(addressCol);
mailMsg.setSubject(“creating an outlook message file”);

mailMsg.setHtmlBody("This line is in bold.

"
+ “This line is in blue color


+ “Here is an embedded image.

+ “Here is an embedded image.

+ “Here is an embedded image.

+ “Here is an embedded image.
”);

// Add linked resource
LinkedResource res1 = new LinkedResource(“E:\aspose\Picture_14.png”, MediaTypeNames.Image.PNG);
res1.setContentId(“pic14”);
mailMsg.getLinkedResources().add(res1);

LinkedResource res2 = new LinkedResource(“E:\aspose\Picture_15.png”, MediaTypeNames.Image.PNG);
res2.setContentId(“pic15”);
mailMsg.getLinkedResources().add(res2);

LinkedResource res3 = new LinkedResource(“E:\aspose\Picture_16.png”, MediaTypeNames.Image.PNG);
res3.setContentId(“pic16”);
mailMsg.getLinkedResources().add(res3);

LinkedResource res4 = new LinkedResource(“E:\aspose\Picture_17.png”, MediaTypeNames.Image.PNG);
res4.setContentId(“pic17”);
mailMsg.getLinkedResources().add(res4);

MapiMessage outlookMsg = MapiMessage.fromMailMessage(mailMsg);
String strMsgFile = “E:\aspose\message.msg”;
outlookMsg.save(strMsgFile);

//Create an instance of PersonalStorage
PersonalStorage pst = PersonalStorage.create(“E:\aspose\sample.pst”, 0);
FolderInfo folderInfo = pst.createPredefinedFolder(“Inbox”, StandardIpmFolder.Inbox);
folderInfo.addMessage(outlookMsg);


The mail message.msg shows all four embedded pictures, but in the pst file the message shows only three pictures, the fourth picture has a red cross.

Thanks and regards,
Jan



Hi Jan,


Could you please share the version of Aspose.Email for Java that you are using at your end? With a valid temporary license, there shouldn’t be any such evaluation limitation imposed as tested at my end. Please note that license initialization in application should be before any call to the API methods. Your feedback will help us assist you further in this regard.

Hi,

Thank you very much for your feedback. It was my mistake. I forgot to initialize the temporary license. Now it works.

Thanks,
Jan

Hi Jan,


Thank you for the feedback. Please feel free to write to us if you have any additional query/inquiry with respect to Aspose.Email. We’ll be glad to assist you further.