title: Inserting Dataframe into Outlook email message
body: <p>I'm trying to insert a dataframe into an email and tried using pretty html tables and to_html. The email displays and everything looks great except the table is not embedded. I've tried several methods but nothing seems to work. Any thoughts? Code below. (And thanks in advance!)</p>
  <pre><code>    import win32com.client as client
      from pretty_html_table import build_table
      outlook = client.Dispatch('Outlook.Application')
      message = outlook.CreateItem(0)
      message.Display()
      message.To = &quot;EMAIL&quot;
      message.Subject = &quot;Action Required - XXXX&quot;
      html_body = &quot;&quot;&quot;
  
      HTML CODE HERE
  
      &quot;&quot;&quot;.format(build_table(df_final, 'blue_light'))
  
      message.HTMLBody = html_body
  </code></pre>