from smtplib import SMTP
import smtplib
from email.header import Header
smtpserver='smtp.sina.com'
password='123456'
user='username@sina.com'
sender='username@sina.com'
receiver='receive@sina.com'
subject='python email test'
smtp=smtplib.SMTP()
smtp.connect(smtpserver)
smtp.login(user,password)
smtp.sendmail(sender,receiver,msg.as_string())
smtp.quit();
def send_mail(file_new):
    f=open(file_new,'rb')
    mail_body=f.read()
    f.close()
    smtp=smtplib.SMTP()
if __name__ =='__main__':
    test_dir='D:\\testpro\\test_case'
    test_report='D:\\testpro\\report'
    discover=unittest.defaultTestLoader.discover(test_dir,pattern='test_*.py')
    now=time.starttime("%Y-%m-%d_%H_%M_%S")
    filename=open(filename,'wb')
    
Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐