title: smtplib sendmail in python fails SMTPHeloError: (501, b'5.5.4 Invalid Address')
body: <p>I wrote the following code:</p>
  
  <pre><code>import smtplib
  my_address = 'myaddress@msn.com'
  hears = [ 'Subject: A test',
        'From: ' + my_address,
        'To: ' + my_address,
        ]
  entries = "Hello"
  msg ='r\n'.join(hears) + 'r\n' + ' '.join(entries)
  smtp = smtplib.SMTP('smtp.live.com',587)
  smtp.starttls('smtp.live.com')
  smtp.sendmail(my_address, [my_address] , msg)
  smtp.close()
  </code></pre>
  
  <p>I got the error message:</p>
  
  <pre><code>Traceback (most recent call last):
  File "C:\Python33\sssemail.py", line 11, in &lt;module&gt;
  smtp.starttls('smtp.live.com')
  File "C:\Python33\lib\smtplib.py", line 652, in starttls
  self.ehlo_or_helo_if_needed()
  File "C:\Python33\lib\smtplib.py", line 553, in ehlo_or_helo_if_needed
  raise SMTPHeloError(code, resp)
  smtplib.SMTPHeloError: (501, b'5.5.4 Invalid Address')
  </code></pre>
  
  <p>Can any one give me insight on what is happening?</p>