title: Printing mutiple HTML tables using tabulate in python
body: <p>I want to produce two HTML tables using tabulate package, but I am only able to produce one table and send mail.</p>
  
  <p>Is it possible to put more than one html table into a message sent with smtplib and email? Whenever I use attach() for more than one thing, it only adds the first.</p>
  
  <pre><code>text = """
  Hello, Friend.
  
  Here is your data:
  
  {table}
  
  Regards,
  
  Me
  """
  
  html = """
  &lt;html&gt;
  &lt;body&gt;
      &lt;p&gt;Hello, Friend.&lt;/p&gt;
      &lt;p&gt;Here is your data:&lt;/p&gt;
      {table}
      &lt;p&gt;Regards,&lt;/p&gt;
      &lt;p&gt;Me&lt;/p&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  """
  
  with open('input.csv') as input_file:
      reader = csv.reader(input_file)
      data = list(reader)
  
      text = text.format(table=tabulate(data, headers="firstrow", tablefmt="grid"))
      html = html.format(table=tabulate(data, headers="firstrow", tablefmt="html"))
  
      message = MIMEMultipart(
         "alternative", None, [MIMEText(text), MIMEText(html,'html')]
      )
  </code></pre>