[AS7-6480] Fixed JavaMail IMAP SSL sessions not working properly.

Very small fix, just setting imap protocol properly. This fixed the issue.