Python发送邮件

import smtplib
server=smtplib.SMTP()
server.connect("smtp.163.com",25)
server.login("user"," pwd")
server.sendmail("from@163.com","to@qq.com","'Subject: this is a email from python demo\r\n\r\nJust for test~_~'")
server.quit()

 

 

python发送带附件的邮件

posted @ 2011-09-29 17:25  网络小虫  阅读(263)  评论(0编辑  收藏  举报