Is there any way to connect from java application to IMAP server without storing password?? Though i explored and couldn't find any way. So I am encrypting the password with a key and decided to divide key in parts and store in different place- database and some session. Any other way?