str_htmlHeader = "<!DOCTYPE HTML PUBLIC>\n<html>\n";
str_htmlHeader += "<head>\n\t<title>Audi Cloud Services</title>\n</head>\n\n";
str_htmlHeader += "<body>\n\n<h1>Nightly build test results</h1>\n";
str_htmlFooter = "\n</body>\n\n</html>";
for root, dirnames, filenames in os.walk(r'\\ac-srvfile01\_Embedded\VCon1\proj_customer\337159_Audi_ACR_and_TSSS\pcm-audio'):
for filename in fnmatch.filter(filenames, '*.html'):
reportContent = open(os.path.join(root,filename)).read()
attachment = MIMEText(str_htmlHeader+reportContent+str_htmlFooter, 'html')
msg.attach(attachment)
#msg.attach(MIMEText(open(filename).read(), "text/html"))
I am sending the message to a concerned person but the email is going to the respected person in a different email. I want to collect all the reports and send it as a single email. but the above code is sending the reports as a different email. Can someone help me how to fix that?