Could not open socket with SMTP mail Server

Magento uses zend mail to send emails. What is happening is why I try to send mail from magento it gives “Could not open socket”. I guess the error is something related to zend and not to Magento. I have created the SMTP server using node smtp-server. Can I get possible reasons and solutions for it?

Did you tried this solution : https://stackoverflow.com/a/28436702/487878 .

Another way is trying to connect via telnet and see if there is no firewall blocking etc.