发布时间:2013-10-10 15:19:27
[root@os py]# cat mail_html.py #!/usr/bin/pythonimport smtplibimport timefrom email.mime.text import MIMETextfrom email.mime.multipart import MIMEMultipartfrom email.mime.image import MIMEImagemail_from="njnajie@126.com"mail_to="511589735@qq.com"mail_host="smtp.126.com"mail_user="njn.........【阅读全文】
发布时间:2013-07-20 17:09:07
1 简单的邮件发送 #!/usr/bin/pythonimport smtplibimport timefrom email.mime.text import MIMETextmail_content = 'test'mail_from = 'test@126.com'mail_to = ['test@qq.com']msg=MIMEText(mail_content)msg['Subject']='test mail ok'msg['From']=mail_frommsg['To']=';'.join(mail_to)smtp=smt.........【阅读全文】