:javax.mail.MessagingException: Can't send command to SMTP host; nested exception is: java.net.SocketException: socket closed
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   gaya_subbu
Posted On:   Wednesday, January 22, 2003 11:10 PM

I use JavaMail to send mails with attachment. The program works fine in Windows but in AIX on runnning the program i get the following exception

:javax.mail.MessagingException:
Can't send command to SMTP host;
nested exception is:
java.net.SocketException: socket closed.
This exception is thrown in the Statement
Transport.send(message);

Note :The mail-server IP given is correct. Iam able to ping to the mail server from AIX system.

Re: :javax.mail.MessagingException: Can't send command to SMTP host; nested exception is: java.net.SocketException: socket closed

Posted By:   Christopher_Koenigsberg  
Posted On:   Thursday, January 23, 2003 07:09 AM

So you can "ping" the mail server from the AIX server. This only means you can send an ICMP packet. You need to know if you can do ESMTP/SMTP, e.g. TCP/IP to port 25.



So, try, can you manually connect (telnet) to port 25 (the smtp port) on the mail server, from the AIX system? Does it give you an smtp/esmtp greeting? Can you enter the EHLO or HELO command with your (AIX) hostname, and does it respond OK?



If so, then the problem may be in your code somewhere. If not, then for some reason which you'll have to determine (antispam configuration, reverse dns, etc.), the mail server is not accepting smtp connections from your AIX machine.

About | Sitemap | Contact