Jump to content

Unable to connect mal server localhost in java


Recommended Posts

Posted

unable to connect server

 

private void referhEmail(){ try { Properties props = new Properties(); props.setProperty("mail.store.protocol", "pop3"); props.setProperty("mail.pop3.port", "110"); props.setProperty("mail.pop3.host", "localhost"); Session session = Session.getInstance(props); final Store store = session.getStore("pop3"); store.connect("localhost","singa@localhost", "333");

 

i've tried in other port, but still can't

Posted

Permissions are a good shout - if it's a Unix-like OS, the user running Java may not have permission to perform socket I/O operations on those ports.

 

Also, is the server actually listening on localhost? If you configured it to listen on the server's public (or private) IP address, it might not be listening on 127.0.0.1...

Posted
Hello and welcome to edugeek.

 

What level of privileges does your login have over this server? What are you trying to do?

 

 

I've tried use mercury in xampp to use port 110 for pop3, and also setting the mercury with local user localhost

But when i try in my java application, username and password are not suitable, actually that's contents are same all.

 

- - - Updated - - -

 

I'd try telnetting it and running SMTP commands against it to see if it works. You should be able to telnet in and manually send an email.

 

https://www.port25.com/how-to-check-an-smtp-connection-with-a-manual-telnet-session-2/

 

Oke i will try it

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...