Free Support Forum - aspose.com

Exception"The REPORT.IPM.Schedule.Meeting.Request.NDR message class is not supported by now" on extracting message from PST file (Java)

Using Aspose Email for Java trying to extract the messages from the pst file attached [1] and getting this error:

The REPORT.IPM.Schedule.Meeting.Request.NDR message class is not supported by now

code:
private static final SaveOptions SAVE_OPTIONS_EML = SaveOptions.getDefaultEml();
private static final int SAVE_OPTIONS_VCARD = ContactSaveFormat.VCard;

private static void main(String[] args){
	PersonalStorage pst = PersonalStorage.fromFile(<Put pst file here>, false);
	FolderInfo rootFolder = pst.getRootFolder();
	extractFolder(pst, rootFolder, getDestinationPath(), info);
}

private void extractFolder(PersonalStorage pst, FolderInfo folder, Path parentDirectory)
		throws ExtractionException {
	String folderName = folder.getDisplayName();
	Path folderPath = Paths.get(parentDirectory.toString(), folderName);
	folderPath.toFile().mkdirs();

	int messageNumber = 0;
	Iterator<String> iterable = folder.enumerateMessagesEntryId().iterator();
	while(iterable.hasNext()){
		String messageEntryId = iterable.next();
		String fileName = getDirectoryString(folderPath, messageNumber);
		MapiMessage message = pst.extractMessage(messageEntryId);
		IMapiMessageItem item = message.toMapiMessageItem();

		if (item instanceof MapiContact) {
			((MapiContact) item).save(fileName + ".vcf", SAVE_OPTIONS_VCARD);
		} else {
			message.save(fileName + ".eml", SAVE_OPTIONS_EML);
		}
		messageNumber++;
	}

	for (FolderInfo subFolder : folder.getSubFolders()) {
		extractFolder(pst, subFolder, folderPath);
	}
}

[1] https://www.dropbox.com/s/pxee8i2cxs1nvln/SMJ.PC.00016629.zip?dl=0

@mstandfuss,

I have investigated this issue on my end have been able to observe the issue. An issue with ID EMAILJAVA-34540 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

Its showing that EMAILJAVA-34540 is in a closed state, but I never received a release update. Can you please let me know which version it was included in?

@mstandfuss,

We have investigated this on our end and In this case, the you just needs to handle the exception. If you further saves the message, it will be saved with MapiMessage without loss the properties.

If you want to read some properties, it can be read with MapiMessage. The MapiMessageItem class is just a wrapper created for the convenience of reading the properties of a contact, calendar, task, etc., since most of properties are stored as Named Properties and access to them using MapiMessage via id is not convenient.