title: SOCKET ERROR: [Errno 111] Connection refused
body: <p>I am using simple python lib for the SMTP 
  But i am getting this error:</p>
  
  <pre><code>import smtplib
  smtpObj = smtplib.SMTP('localhost')
  
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/usr/lib/python2.7/smtplib.py", line 249, in __init__
      (code, msg) = self.connect(host, port)
    File "/usr/lib/python2.7/smtplib.py", line 309, in connect
      self.sock = self._get_socket(host, port, self.timeout)
    File "/usr/lib/python2.7/smtplib.py", line 284, in _get_socket
      return socket.create_connection((port, host), timeout)
    File "/usr/lib/python2.7/socket.py", line 571, in create_connection
      raise err
  socket.error: [Errno 111] Connection refused
  </code></pre>
  
  <p>Using python-2.7  </p>