title: 500 Syntax error, command unrecognized error while trying to create a SMTP client
body: <p>I am trying to create a SMTP client that uses GMX mail service in order to send an email to my original gmail account.
  I started exploring about SMTP protocol, and I got the main idea. 
  While trying to implement the client I get an error </p>
  
  <blockquote>
    <p>500 Syntax error, command unrecognized</p>
  </blockquote>
  
  <p>As you can see the AUTH process completed successfully, so the email and password and correct. But it doesn't let me send the email from my account.</p>
  
  <p><strong>Here is the full code:</strong></p>
  
  <pre><code>import socket
  
  s = socket.socket()
  s.connect(("smtp.gmx.com",25))
  
  s.send("EHLO gmx\r\n") 
  print s.recv(10000);
  
  
  s.send("AUTH PLAIN dHN0QGdteC5jb21QYXNzd29yZCE=\r\n")
  print s.recv(10000);
  
  print "1"
  s.send("MAIL FROM:&lt;tst@gmx.com&gt;\r\n")
  print s.recv(10000);
  print "2"
  s.send("RCPT TO:tst@gmail.com\r\n")
  
  print s.recv(10000);
  
  s.send("QUIT\r\n")
  </code></pre>
  
  <p><strong>And here is the full result:</strong></p>
  
  <blockquote>
    <p>220 gmx.com (mrgmx101) Nemesis ESMTP Service ready</p>
    
    <p>250-gmx.com Hello gmx [87.68.73.54]<br> 250-SIZE 69920427<br> 250-AUTH LOGIN
    PLAIN <br>250 STARTTLS</p>
    
    <p>1 <br> 500 Syntax error, command unrecognized </p>
    
    <p>2<br> 503 Bad sequence of commands</p>
  </blockquote>