i am getting error in ADDRESS: to address i recevied javax.mail.MessagingException: Could not connect to SMTP host: 10.12.32.206, port: 25, response: -1 at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1140) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:288) at javax.mail.Service.connect(Service.java:233) at javax.mail.Service.connect(Service.java:134) at javax.mail.Service.connect(Service.java:86) at com.sun.mail.smtp.SMTPTransport.connect(SMTPTransport.java:138) at javax.mail.Transport.send0(Transport.java:150) at javax.mail.Transport.send(Transport.java:80) at com.Util.sendMail(Util.java:87) at com.mainClass.main(mainClass.java:18)
I try to ping the host name. it is pinging. I have tried that host name with ip address also. Still i am getting this exception. If anyone tells me what i am wrong in this code, it will be useful for me.
Thanks in advance. [ June 08, 2007: Message edited by: palmari sivasubramanian ]
Ping doesn't use SMTP, so it is a mechanism to find out if a server exists and is responsive, but wont tell you if you can connect via SMTP. Are you behind a firewall? Do you access your SMTP server via a proxy? Can you telnet to the SMTP server? [ June 08, 2007: Message edited by: Paul Sturrock ]