Manish Narang

Greenhorn
+ Follow
since Apr 29, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Manish Narang

Hi All,
My problem is solved. Just wanted to inform that the problem was: "SMTP Relay was not enabled for our TEST and DEV servers on the SMTP HOST". requested them to enable it and it works great...!!!

Thanks all for your help!!!

12 years ago

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



Thanks for your reply Farrell..!
Pat Farrell: The scenario is like, we use the same smtp host in our all three env's (DEV, TEST, PROD). This program runs FINE in Production servers but not in others..
so can it be a problem with the smtp host server or DEV and TEST servers ?
i mean should contact the team which supports smtp host or DEV/TEST servers ?
12 years ago

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



Hi even i am facing the same problem, even if i replace HostName with the IP of the server , i am getting the same error.

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?

I can ping the server, i can telnet the server with port 25, everything is fine. but SAME ERROR.

12 years ago