import smtplibserver=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发送带附件的邮件