Java Socket Error When Connecting to Telnet Server for SMTP Validation
For some reason, I can't connect my java Socket
to the following FQDN
1753003334.pamx1.hotmail.com.
I've tried with other mail-servers, and they didn't give me this problem. But, this one, whose preference (according to nslookup) is 0, causes the Socket to throw a ConnectException when the socket tries to execute socket(SocketAddress endpoint)
method - the Java SE 6 doesn't even list it as one of the pos开发者_Python百科sible exceptions that it will throw.
Additionally, I tried the mail-server, manually, on the command prompt by executing the telnet utility, and everything worked fine.
What about this domain name is causing my Java program to crash? Can anyone help me with this problem?
Many mail servers use the alternate port, 587 instead of 25, because many ISPs block 25 to prevent spamming (both from malware and malicious users) and getting their IP range blacklisted. Hotmail does accept connections to port 587 according to This Page
精彩评论