Hello Aspose team,
We have been using Aspose for quite some time and we ran into several issues so we would be grateful if you could help us resolve them.
We have tried the following:
- saving the existing EML files in PST format
- then reading the emails from PST (once they were converted to EML)
and here are the issues we’ve experienced:
- reduction of empty spaces in body
- reduction of empty spaces in subject
here is the code that we are using:
asposeLicence();
PersonalStorage personalStorage = PersonalStorage.create(LOCATION, 0);
FolderInfo currentFolderInfo = personalStorage.getRootFolder().addSubFolder("archive");
currentFolderInfo.addMessage(MapiMessage.fromMailMessage(MailMessage.load(EML)));
personalStorage.dispose();
personalStorage = null;
currentFolderInfo = null;
personalStorage = PersonalStorage.fromFile(LOCATION);
currentFolderInfo = personalStorage.getRootFolder().getSubFolder("archive");
for (MessageInfo content : currentFolderInfo.getContents()) {
final MapiMessage mapiMessage = personalStorage.extractMessage(content.getEntryIdString());
final MailMessage mailMessage = mapiMessage.toMailMessage(new MailConversionOptions());
mailMessage.save("generated.eml", EmlSaveOptions.getDefaultEml());
}
Please check the attached two images where you could see the clear differences.
Could you please get back to us if you have any idea how to overcome this problem?
Thank you!
Screenshot from 2020-07-30 11-06-39.png (419.6 KB)
Screenshot from 2020-07-30 11-08-22.png (128.0 KB)