Pat Farrell wrote:
Manish Narang wrote:
javax.mail.MessagingException: Could not connect to SMTP host: 10.35.55.203, port: 25, response: -1
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1270)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
at javax.mail.Service.connect(Service.java:275)
at com.jnj.email.p.MailSender.sendMail(MailSender.java:59)
at com.jnj.email.p.MailSender.main(MailSender.java:23)
Could you please help?
The error message is actually quite informative. That server is not answering on port 25.
You need to contact that host's admin and see if they support SMTP input, and if so, do they require TLS, SSH, etc.
Its not a programming error, its an admin/usage issue
Rahul Bhattacharjee wrote:
Originally posted by Naresh Rajan:
Rahul,
I tried the telnet stuff and it is connecting. but my application is not working. I cannot get the IP address. The name is correct though!!
try the following to get the IP address
ping <your_machine_name>
The response will have something like
Pinging with x bytes <your_machine_name> [your_IP]
Now use your_IP