Question

I am using XAMPP for deploying my java application in tomcat and also using mercury mail to send emails. Now i am just testing my application with a small java program using java mail API and mercury email. I have done the necessary configuration in Mercury to setup localhost. Now when running the java program..its says

javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;
  nested exception is:
    java.net.SocketException: Network is unreachable: connect
    at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1962)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:654)

While my XAMPP Mercury Server is up and running with following port numbers

25, 79, 105 , 106, 110, 143, 2224

I also tested telnet command...result is as follows..

telnet localhost 25
220 localhost ESMTP server ready.

Now I'm stuck. Since i am working from my university lab and Symantec End Point Protection is installed on the systems so i cant even check if the Firewall is causing any problems....

Was it helpful?

Solution

It's almost certainly Symantec End Point Protection that is causing the problem. Probably your university doesn't want you running your own mail server.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top