title: Error 252 : b"2.1.5 Send some mail, I'll try my best f18sm1267047wiv.14"
body: <p>Hi I've written a Python script to send a simple message. The script works with my university email address. However, with gmail there seems to be a problem. I've tried using both my email and just login as a login name - same result. The error I get is:</p>
  
  <pre><code>Error 252 : b"2.1.5 Send some mail, I'll try my best f18sm1267047wiv.14"
  </code></pre>
  
  <p>I'm not sure what I'm doing wrong. I really couldn't find much info. All I get is the above line, nothing else. I'm running the script on a Linux machine and it was written on a linux machine.</p>
  
  <pre><code>#! /usr/bin/python3.1
  
  def sendmail(recepient,  msg):
  
      import smtplib
  
      # Parameters
      sender = 'login@gmail.com'
      password = 'password'
      smtpStr = 'smtp.gmail.com'
      smtpPort = 587
      # /Parameters
  
      smtp_serv = smtplib.SMTP(smtpStr, smtpPort)
      smtp_serv.ehlo_or_helo_if_needed()
      smtp_serv.starttls()
      smtp_serv.ehlo()
  
      recepientExists = smtp_serv.verify(recepient)
      if recepientExists[0] == 250:
          smtp_serv.login(sender, password)
          try:
              smtp_serv.sendmail(sender, recepient, msg)
          except smtplib.SMTPException:
              print(recepientExists[1])
      else:
          print('Error',   recepientExists[0], ':',  recepientExists[1])
  
      smtp_serv.quit()
  
  sendmail('receiver@gmail.com',  'hi')
  </code></pre>