• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java mail problems that I can't handle  RSS feed

 
faithnomore
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am writing a class encapsulate Java mail API to get mails from a given mail folder(For Ex. "INBOX") using POP3 protocol.
In testing time,I can get Store object successfully,and I
can also get Folder object bu invoking method Store.getFolder("INBOX").But when I invoke method Folder.open(Folder.READ_WRITE),exception occurs.I invoke method Exception.printStack() to print the information about the exception:
java.lang.ClassCastException: java.lang.Object
at Common.MailProcess.Cls_GetMailProcess.setMailFolder(Cls_GetMailProces
s.java:126)
Well,in the method 'setMailFolder',I can get different Folder objects according to the different mail box name.
Thanx for giving me advisor.
 
John Wetherbie
Rancher
Posts: 1449
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"faithnomore",
Please read the JavaRanch naming policy and re-register.
Thanks,
John
 
Metal Zhang
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes.I am faithnomore.I apply a new account
------------------
Java lover from hell!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!