python 发送邮件+多人+附件 最好用!!!

#!python3
#codin=utf-8
import yagmail

yag = yagmail.SMTP(user='2679813@qq.com', password='mwlgdmwv4rssidijb', host='smtp.qq.com', port='465')
body = "以下是limi web测试附件,请查收..."
yag.send(to=['24547602@qq.com','liunui@miji.com'], subject='limi web 自动化测试报告', contents=[body, './test.html','./fight.html'])
print("已发送邮件")

posted @ 2018-07-22 20:24  yanhuidj  阅读(1685)  评论(0编辑  收藏  举报