Re: How can i make that the session read the properties for each time?
Posted By:
Anonymous
Posted On:
Tuesday, May 29, 2001 06:04 AM
The whole connection depends on the session object, so if you want to change
the properties during runtime, you have to kill the connection
, make a new session object with the new Properties and reconnect .
If you use authenticator, you have to be reinit it also.
this line of code change my properties during runtime:
folder.close
store.close
authenticator = new Authenticator(properties);
session = getInstance(properies);
store.connect(..);
folder.open();
dont use the default instance when reconnecting.
this doesn't change the prop and session object. (this is not a good feature in javamail i think!)
hope this helps someone
Alex