DEV Community

Discussion on: Parsing Outlook emails in Java

Collapse
 
vinod98 profile image
Vinod98

I am getting the error as below and I am using the same code snippet you mentioned above. Any idea why?

org.apache.poi.poifs.filesystem.NotOLE2FileException: Invalid header signature; read 0x615F3430305F2D2D, expected 0xE11AB1A1E011CFD0 - Your file appears not to be a valid OLE2 document
Invalid header signature; read 0x615F3430305F2D2D, expected 0xE11AB1A1E011CFD0 - Your file appears not to be a valid OLE2 document
inside load messages
at org.apache.poi.poifs.storage.HeaderBlock.(HeaderBlock.java:151)
at org.apache.poi.poifs.storage.HeaderBlock.(HeaderBlock.java:117)
at org.apache.poi.poifs.filesystem.POIFSFileSystem.(POIFSFileSystem.java:285)
at com.auxilii.msgparser.MsgParser.parseMsg(MsgParser.java:159)
at com.auxilii.msgparser.MsgParser.parseMsg(MsgParser.java:138)
at com.aspose.email.examples.email.Email_Parse.loadMessages(Email_Parse.java:36)
at com.aspose.email.examples.email.Email_Parse.getMessages(Email_Parse.java:114)
at com.aspose.email.examples.email.Email_Parse.main(Email_Parse.java:25)