I’m trying to run the following code from Aspose example file (https://github.com/aspose-email/Aspose.Email-for-Java/blob/master/Examples/src/main/java/com/aspose/email/examples/outlook/pst/AddMapiNoteToPST.java):
MapiMessage mess = MapiMessage.fromFile(dataDir + “Note.msg”);
// Note #1
MapiNote note1 = (MapiNote) mess.toMapiMessageItem();
This code throws the following error message:
com.aspose.email.MapiMessage cannot be cast to com.aspose.email.MapiNote
How can I do to run this code?