0

I have a code which uses win32com to open Outlook and send mail. I am trying to send a table which is in myexample.html file to a recipient. However when I use

msg.body=open('myexample.html').read()

This is what comes in the mail that I've sent

table border="1" class="dataframe"> 
  <thead> 
    <tr style="text-align: right;"> 
      <th>DG Lead</th> 
    </tr> 
  </thead> 
  <tbody> 
    <tr> 
      <td>Krishnamurthy Ramamurthy</td> 
      <td>324</td> 
> 
    <tr> 

But I want a table view of this. How can I get that?

2

1 Answer 1

0

Figured out the answer to it. Just need to alter

msg.body = body

to

msg.HTMLBody  = body
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.