I want to insert a .html file as text by using python. I am using win32com but problem is that it is attaching the file in attachment i want to insert it in main body.
import win32com.client
from conf import *
const=win32com.client.constants
olMailItem = 0x0
obj = win32com.client.Dispatch("Outlook.Application")
newMail = obj.CreateItem(olMailItem)
newMail.Subject = "ST_Report_20" + time.strftime("%y%m%d")
newMail.Body = "Please Find the Report here " + path + "\index.html"
newMail.To = "[email protected]"
attachment1 = "D:\Work\Report_auto\Report.htm"
newMail.Attachments.Add(attachment1)
newMail.display()
newMail.send()