title: SMTP connection with node
body: <p>I'm trying to connect my client to a gmail smtp server without using specific node-smtp libs ( i want to understand how sockets and smtp both work ), but after setting a connection to a server i get no response whatever i write to a socket.
  This is a part of my code: </p>
  
  <pre><code>var options = {
      host: 'smtp.gmail.com',
      username: 'mylogin@gmail.com',
      password: 'mypass',
      port: 25
      },
      net = require('net');
  
  exports.addEmail = function(req, res) {
  
      var client = net.connect(options.port, options.host, function() {
          console.log('CONNECTED TO: ' + options.host + ':' + options.port);
          //i can write to a socket anything, still no response
          client.write('HELO smtp.gmail.com');
      });
  
      client.on('data', function(data) {
          console.log('DATA: ' + data);
      });
  
      client.on('error', function(err) { console.log(err );})
  
      client.on('close', function() {
          console.log('Connection closed');
      });
  }
  </code></pre>
  
  <p>What i get in console is: 
    CONNECTED TO: smtp.gmail.com:25
    DATA: 220 mx.google.com ESMTP n7sm5406410lae.47 - gsmtp</p>
  
  <p>That's all - no errors, no 5xx or 4xx responses, only 220 after establishing a connection and i don't understand why it happesns I will highly appreciate your help.</p>