我有下一个代码:
def send_email(self, alert_emails, subj, msg):
global alert_from
p = os.popen("/usr/sbin/sendmail -t" , 'w')
p.write("To: %s\n" % (','.join(alert_emails),))
p.write("From: %s\n" % (alert_from,))
p.write("Subject: %s\n\n" % (subj,))
p.write(msg)
return p.close()
它发送纯文本消息。如何更改它以发送HTML消息?
由于