Free Support Forum - aspose.com

Exception "The IPM.SkypeTeams.Message 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 IPM.SkypeTeams.Message 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/q4izhn78wf96i2z/SMJ.PC.00000010.pst.zip?dl=0

@mstandfuss,

I have investigated this issue on my end have been able to observe the issue. An issue with ID EMAILJAVA-34543 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-34543 is in a closed state now, but I did not receive any release notification. Can you please let me know which version the fix was included in?

@mstandfuss,

We have investigated the issue and in this case, you just need to handle the exception.

If you further save 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.