java - How to get rid of 'Failed to load IMAP envelope' Messaging Exception? -


i trying list of emails message msg[] = folder.getmessages();. after getting details of each message, meanwhile getting javax.mail.messagingexception: failed load imap envelope exception message.

this protocol trace 1 message producing error -

a7 fetch 2 (envelope internaldate rfc822.size) * 2 fetch (rfc822.size 2567 internaldate "29-apr-2011 13:49:01 +0000" envelope ("fri, 29 apr 2011 19:19:01 +0530" "i nees assisance?????" (("mr leung cheung" nil "info" "milium.com.br")) (("mr leung cheung" nil "info" "milium.com.br")) ((nil nil "mr.leung_cheung" "live.hk")) () nil nil nil "<20110429134718.70333732030a@mail2.milium.com.br>")) a7 ok fetch completed 

stacktrace of error is-

failed load imap envelope stacktrace: javax.mail.messagingexception: failed load imap envelope     @ com.sun.mail.imap.imapmessage.loadenvelope(imapmessage.java:1276)     @ com.sun.mail.imap.imapmessage.getsentdate(imapmessage.java:377)     @ com.my.main.model.testmail.showallmails(testmail.java:95)     @ com.my.main.model.testmail.main(testmail.java:45) 

i using javamail-1.5.

how can resolve error, there way or settings solve , details of message without skipping message?

thanks,

neelam sharma

your server broken. please report error server vendor. server using?

in response, message's "to" value must meet syntax defined in spec:

env-to      = "(" 1*address ")" / nil address     = "(" addr-name sp addr-adl sp addr-mailbox sp addr-host ")" 

instead, server has returned "()". should've returned "nil" if there no header.

you can work around server bugs using technique described in javamail faq.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -