发送HTML电子邮件usind sendmail命令我有下面的代码:如何从Python的
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邮件呢?
感谢
已经回答: http://stackoverflow.com/questions/882712/sending-html-email-in-python – 2012-02-03 15:22:15