File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javamail Listner

 
sachin roy
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I added MessageCountListener to inbox by using javamail API... but the problem i am facing is after one callback program
is terminating, it is not listing to next added messages.. can you please tell me the solution for resolving this problem..??
my expectation is that, the listener should count or listen each and every messages added to the inbox..!!

Thanks in Advance,
Sanjeev
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does the relevant code look like? And are you sure new messages are added after the first callback?

 
sachin roy
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jaikiran Pai,

This is the sample program..

As like you said after idle() method it has been continuing for new messages to arrival.. after arrival of new messages
it is successfully getting new messages.. but the problem is if i operate on that message as mentioned in code message.getSubject() it is failing
to get that message and it is terminating from the application.. please give me the solution for this..

thanks in advance..


 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sachin roy wrote:but the problem is if i operate on that message as mentioned in code message.getSubject() it is failing
to get that message and it is terminating from the application..

The code that you posted shows that you print out the exception stacktrace when something goes wrong while fetching the message. What exception stacktrace are you seeing?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic