title: How do I use MIMEMultipart?
body: <p>I want to make a script that sends my homework to my mail every now and then, but they sending a mail part isn't working. I have looked at tutorials, but I still get a mistake when i write 
  <code>msg = MIMEMultipart()</code>
  Is there something wrong with that?
  (I use gmail)</p>
  
  <pre><code>for name, email in zip(names, emails):
      print("Writing the mail")
  
      msg = MIMEMultipart()
  
      # add in the actual person name to the message template
      message = message_template.substitute(PERSON_NAME=name.title())
  
      # setup the parameters of the message
      msg['From']=Myaddress
      msg['To']=email
      msg['Subject']="Homework"
  
      # add in the message body
      msg.attach(MIMEText(message, 'plain'))
  
      # send the message via the server set up earlier.
      s.send_message(msg)
      print("Mail sent")
  
      del msg
  </code></pre>
  
  <p>btw I have multiple mails to send it to.
  And yes I imported these:</p>
  
  <pre><code>import smtplib
  from email.mime.multipart import MIMEMultipart
  from email.mime.text import MIMEText
  </code></pre>