# coding:utf-8
import yagmail
def apitestreport_to_email():
# 第一行,链接登录邮箱服务器
yag = yagmail.SMTP(user="[email protected]", password="123456", host='smtp.exmail.qq.com')
# 第二行,邮箱正文
contents = ['测试详情:','<a href="http://127.0.0.1/apitestreport/>Click me']
# 第三行,发送邮件
yag.send('[email protected]', '接口自动化测试报告',contents)
if __name__=='__main__':
apitestreport_to_email()