title: Send an e-mail using Python 3
body: <p>I'm working on a guessing game where there are tons of characters and it gives you hints for you to guess the character. There is also going to be a thing where you can submit a character. I want to do it so that it will send me an e-mail if somebody submits a character, but it's not working. Here's my code:</p>
  
  <pre><code>import smtplib
  
  FROM = 'Guess@Character.com'
  TO = ["mikpe120@gmail.com"] # must be a list
  SUBJECT = "Somebody submitted a character!"
  TEXT = "Name: "  + name + "NameType: " + nameType
  
  # Prepare actual message
  message = """\
  From: %s
  To: %s
  Subject: %s
  
  %s
  """ % (FROM, ", ".join(TO), SUBJECT, TEXT)
  
  # Send the mail
  server = smtplib.SMTP('myserver')
  server.sendmail(FROM, TO, message)
  server.quit()
  </code></pre>
  
  <p>And here is the error that I got:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:/Users/Mikolaj Perzyna/Desktop/addCharacter.py", line 106, in &lt;module&gt;
      server = smtplib.SMTP('myserver')
    File "C:\Users\Mikolaj Perzyna\AppData\Local\Programs\Python\Python36\lib\smtplib.py", line 251, in __init__
      (code, msg) = self.connect(host, port)
    File "C:\Users\Mikolaj Perzyna\AppData\Local\Programs\Python\Python36\lib\smtplib.py", line 335, in connect
      self.sock = self._get_socket(host, port, self.timeout)
    File "C:\Users\Mikolaj Perzyna\AppData\Local\Programs\Python\Python36\lib\smtplib.py", line 306, in _get_socket
      self.source_address)
    File "C:\Users\Mikolaj Perzyna\AppData\Local\Programs\Python\Python36\lib\socket.py", line 704, in create_connection
      for res in getaddrinfo(host, port, 0, SOCK_STREAM):
    File "C:\Users\Mikolaj Perzyna\AppData\Local\Programs\Python\Python36\lib\socket.py", line 743, in getaddrinfo
      for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
  socket.gaierror: [Errno 11001] getaddrinfo failed
  </code></pre>
  
  <p>I'm sorry if I'm formatting this post wrong, which I probably am, but this is my first question on the site.</p>