#!/usr/bin/envpython
#-*-coding:utf8-*-
importsmtplib
fromemail.mime.textimportMIMEText
textfile=‘sendmail.html‘
withopen(textfile,‘rb‘)asf:
msg=MIMEText(fp.read(),‘html‘,‘utf8‘)
msg.set_charset(‘utf8‘)
me=‘xxx@163.com‘
you=‘xxxx@qq.com‘
msg[‘Subject‘]=..
分类:
编程语言 时间:
2014-07-04 06:41:33
阅读次数:
325
python发送邮件的时候,总是出现:[Errno 10060] 错误码根据debug得到在connect的时候出错。认真检查了下host,没有错呀~应该就是服务器的host。查看了下网上的一些例子,发现qq的host举例:smtp.qq.com/smtp.163.com/smtp.162.com于...
分类:
编程语言 时间:
2014-06-27 21:16:48
阅读次数:
483