Monday, July 16, 2001 08:12 PM
I copied a sample code from a book. It demonostrates the way to fetch mail throught JavaMail API. I used it to read mail on a Apache JAMES mail server.
The following code occassionaly failed and resulted in a Java.lang.SecurityException: Access to default session denied.
Session session = Session.getDefaultInstance(props, null);
Everytime this occurs, I must stop the mail server and restart it. Then, the program can fetch the mail as expected. Can any one tell me why? How can I work around this problem?