How does JavaMail handle thread management? Looks like by default, most of the threads created by JavaMail while fetching the messages from a Store/Folder object are not being released automatically. Do I need to explicitely invoke any method so that these threads get released?

John Zukowski

Closing the Folder, Store, or Transport should cause the thread to terminate itself after delivering any pending events to listeners.