Reputation: 9
I want to connect to a POP3S (SSL security) server in linux(the pop3 server is dovecot). I tried with normal sockets but it doesn't work(i get no reply from server) new Socket("localhost", 995). I found this command searching on the internet: "openssl s_client -connect localhost:995" and it works from terminal (+OK Dovecot ready.). Any solutions? (with or without java.mail library) i prefer without java.mail, but its also good with it. Thanks!
Upvotes: 0
Views: 471
Reputation: 29961
You're getting no reply from the server when creating your own Socket because you're not creating an SSLSocket.
Try JavaMail, it should work fine. Start at the JavaMail FAQ.
Upvotes: 1