1
crazybubble 2012-11-20 17:34:23 +08:00
可以用脚本发送,gmail的脚本参考:
import smtplib sendto = ['[email protected]', '[email protected]', '[email protected]'] #收件人 no = [1,2,3] #编号 gmail_username = '[email protected]' gmail_password = 'password' smtpserver = smtplib.SMTP("smtp.gmail.com", 587) smtpserver.ehlo() smtpserver.starttls() smtpserver.ehlo() smtpserver.login(gmail_username,gmail_password) for i in range(len(sendto)): header = 'To:' + sendto[i] + 'From:' + gmail_username + '\n' + 'Subject:testing \n' print header msg = header + '\n this is testing if python gmail works \n\n' + str(no[i]) smtpserver.sendmail(gmail_username, sendto, msg) print 'done!' smtpserver.close() |
2
crazybubble 2012-11-20 17:39:58 +08:00
excel的数据可以导出成csv格式,然后用python先读取,一一对应地放到上面那段代码里的两个list里就OK
|
3
nervouna 2012-11-20 17:47:14 +08:00
@crazybubble 你的代码没缩进……用 gist 吧~
|
4
crazybubble 2012-11-20 17:54:38 +08:00
@nervouna ...对哦。。
|
5
crazybubble 2012-11-20 18:07:15 +08:00 1
|
6
Archangel_SDY 2012-11-20 18:25:02 +08:00
Word有邮件合并功能.
|
7
adyizhan OP |
8
crazybubble 2012-11-20 21:13:13 +08:00
|
9
jacy 2012-11-20 21:31:48 +08:00
用word就行,邮件合并,很方便。应该大学都学过吧?
|
10
dotbuddle 2012-11-20 23:27:02 +08:00
额……我也记得office可以,跟打印奖状有点类似,貌似
|