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,
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,
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,