I am creating an application in Java to read mails from my GoDaddy webmail through Java. I have used javax.mail for this.
When I debug the program, it gives an error at the line: bodyPart.isMimeType("text/plain")
Unexpectedly, it processes the first mail in the right way but gives the error for the second mail.
Here is the complete stack trace:
javax.mail.MessagingException: Unable to load BODYSTRUCTURE
at com.sun.mail.imap.IMAPMessage.loadBODYSTRUCTURE(IMAPMessage.java:1306)
at com.sun.mail.imap.IMAPMessage.getContentType(IMAPMessage.java:465)
at javax.mail.internet.MimeBodyPart.isMimeType(MimeBodyPart.java:1050)
at javax.mail.internet.MimeMessage.isMimeType(MimeMessage.java:986)
at asanaLambdaIntegrationDebugMode.getNameMailIdFromMessage(asanaLambdaIntegrationDebugMode.java:1318)
at asanaLambdaIntegrationDebugMode.main(asanaLambdaIntegrationDebugMode.java:978)
Any suggestions on this please?
Give a try to the workaround described here: https://javaee.github.io/javamail/FAQ#imapserverbug
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With