Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to connect with store by pop3s protocol?

843830Jan 9 2007 — edited Jan 9 2007
I've written the following code to connect with a store in a server.
                       Properties props = new Properties();
                        Session session = Session.getDefaultInstance(props,null);
                        System.out.println("Session created");
                        store = session.getStore("pop3s");
But it's showing the following error.

[12:07:00:488]|[01-09-2007]|[SYSOUT]|[INFO]|[14]|: javax.mail.MessagingException: Connect failed;
nested exception is:
java.net.ConnectException: Connection refused|
[12:07:00:488]|[01-09-2007]|[SYSOUT]|[INFO]|[14]|: at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:148)|
[12:07:00:488]|[01-09-2007]|[SYSOUT]|[INFO]|[14]|: at javax.mail.Service.connect(Service.java:275)|
[12:07:00:488]|[01-09-2007]|[SYSOUT]|[INFO]|[14]|: at javax.mail.Service.connect(Service.java:156)|



In the server POP3 is running. Is it necessaray to configure for POP3S also?. Then how to do it?. Give a brief about the configuration of POP3S if necessary.

regards,
MAYA
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 6 2007
Added on Jan 9 2007
1 comment
542 views